[Top][All Lists]

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

Re: Need for "-ts-mode" modes

From: Yuan Fu
Subject: Re: Need for "-ts-mode" modes
Date: Thu, 29 Dec 2022 11:27:41 -0800

>>> or creating new modes that depend
>>> on tree-sitter and that don't work or even try to provide some fall-back
>>> if the library is not available.
>> I fail to see what's wrong with that.  It is entirely legitimate to
>> have a major mode which depends on an optional feature and doesn't
>> work without it.  
> Naturally, if there is no way around this.  My argument is that there
> is.  What prompted me to ask this question was when I just opened a
> Dockerfile and a warning popped up, telling me that I was missing the
> right libraries. 

I think we should not enable docker-ts-mode in auto-mode-alist if 
(treesit-language-available-p 'dockerfile) is nil. This way you don’t get the 
warning. In Emacs 30 we can upgrade the auto-mode facility to use different 
modes based on some condition.


reply via email to

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