emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter central configuration variable


From: Eshel Yaron
Subject: Re: Tree-sitter central configuration variable
Date: Fri, 29 Nov 2024 08:12:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

Yuan Fu <casouri@gmail.com> writes:

> Actually, I want to expand this to something that allows users to
> configure tree-sitter modes and toggle on/off tree-sitter features.
>
[...]
>
> What do you guys think about something like this:
>
> (setq treesit-global-configuration
>       '((c-ts-mode
>          ;; Set treesit-font-lock-level to 4
>          (font-lock-level . 4)
[...]
>          )))
>

FWIW, I think tree-sitter should be treated as an implementation detail,
not a user-facing concept.  Tree-sitter empowers major mode developers,
but users shouldn't have to know or care about tree-sitter to benefit
from it.  So a TS-specific configuration user option is not the best
approach IMO.  (For the same reason, I'm not a big fan of the "powered
by tree-sitter" that we have today in the docstring of various modes.)

Instead, when it comes to settings that apply across major modes, I
think we should focus on knobs that make sense whether or not a mode is
TS-based, and have the TS-based modes respect such universal settings.


Just my 2c,

Eshel



reply via email to

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