emacs-devel
[Top][All Lists]
Advanced

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

Re: Turning on/off tree-sitter modes


From: Juri Linkov
Subject: Re: Turning on/off tree-sitter modes
Date: Mon, 25 Nov 2024 09:24:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

>>>    major-mode-remap-alist:
>>>    INS DEL Key: js-mode
>>>            Value: js-ts-mode
>>>    INS DEL Key: ruby-mode
>>>            Value: ruby-ts-mode
>> In addition, I personally find this UI quite perplexing, and kinda
>> doubt users who use it will understand what "Key" and "value" mean in
>> this case.
>
> We could add more detailed annotations to those customization fields, so it
> could look more like this, for example:
>
>   Major Mode Remap Alist:
>   Repeat:
>   INS DEL Cons-cell:
>               Mode to map from: js-mode
>               Function to call instead: js-ts-mode
>   ...

Also it's possible to add the keyword :options

  :options '((js-mode (function :value js-ts-mode))
             (ruby-mode (function :value ruby-ts-mode)))

that will allow the users just to click on the checkbox
to enable a ts-mode.



reply via email to

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