[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
- Define treesit-font-lock-level as buffer local, Vincenzo Pupillo, 2024/11/07
- Re: Define treesit-font-lock-level as buffer local, Eli Zaretskii, 2024/11/07
- Re: Define treesit-font-lock-level as buffer local, Vincenzo Pupillo, 2024/11/07
- Re: Define treesit-font-lock-level as buffer local, Yuan Fu, 2024/11/09
- Re: Define treesit-font-lock-level as buffer local, Eli Zaretskii, 2024/11/09
- Re: Define treesit-font-lock-level as buffer local, Yuan Fu, 2024/11/10
- Re: Define treesit-font-lock-level as buffer local, Eli Zaretskii, 2024/11/23
- Tree-sitter central configuration variable, Yuan Fu, 2024/11/29
- Re: Tree-sitter central configuration variable,
Eshel Yaron <=
- Re: Tree-sitter central configuration variable, Yuan Fu, 2024/11/29
- Re: Tree-sitter central configuration variable, Eli Zaretskii, 2024/11/29
- Re: Tree-sitter central configuration variable, Yuan Fu, 2024/11/29
- Re: Tree-sitter central configuration variable, Eli Zaretskii, 2024/11/29
- Re: Tree-sitter central configuration variable, Stefan Monnier, 2024/11/29
- Re: Tree-sitter central configuration variable, Ship Mints, 2024/11/29