[Top][All Lists]

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

Re: Turing on tree-sitter

From: Stefan Monnier
Subject: Re: Turing on tree-sitter
Date: Mon, 10 Oct 2022 10:52:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> Is there a reason we can't use a minor mode?  Something like
>>         (add-hook 'python-mode-hook #'treesit-mode)
>> or a list
>>         (add-to-list 'treesit-modes 'python-mode)
>> ?
> We could, if a minor mode is justified.  When this was previously
> brought up, someone said the justification for a minor mode was too
> weak in most cases.  But maybe we should revisit that idea.

I think a buffer-local `treesit-mode` plus a `global-treesit-mode` would
make a lot of sense, from a user's perspective.  This way they don't
have to hunt for the name of the boolean variable that their mode
decided to use to control the use of treesitter: all modes use the same
boolean variable called `treesit-mode`.

Then again, to me a minor mode is something so cheap that the idea that
"justification for a minor mode was too weak" is rather hard to grasp.


reply via email to

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