emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need for "-ts-mode" modes


From: Eli Zaretskii
Subject: Re: Need for "-ts-mode" modes
Date: Fri, 30 Dec 2022 10:49:09 +0200

> From: Richard Stallman <rms@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 29 Dec 2022 23:05:24 -0500
> 
>   > > I think we should not enable docker-ts-mode in auto-mode-alist if 
> (treesit-language-available-p 'dockerfile) is nil.
> 
>   > I don't see how this could be accomplished, since whether three-sitter
>   > is available for a language is only known at run time, and
>   > auto-mode-alist is in files.el, which is preloaded.
> 
> It would be possible for `docker-ts-mode' to check whether tree-sitter
> is available for the Docker language, and DTRT if not.

It does: it displays a warning (when you visit a file that should
trigger this mode).  Like this:

 ■  Warning (treesit): Cannot activate tree-sitter, because tree-sitter library\
 is not compiled with Emacs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]