emacs-devel
[Top][All Lists]
Advanced

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

Re: Average-user-facing interface for tree-sitter


From: Yuan Fu
Subject: Re: Average-user-facing interface for tree-sitter
Date: Tue, 25 Oct 2022 14:37:12 -0700


> On Oct 24, 2022, at 4:55 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>> There will not be treesit-mode and global-treesit-mode, only the central
>> variable treesit-settings. Enabling tree-sitter only requires adding (mode
>> t) to treesit-setttings, and M-x revert-buffer, or reopen the file, or rerun
>> the major mode.
> 
> Yeah, I guess it's good enough for now.  We can still keep all the
> treesit-<foo> variables and then a `treesit-enable` function which the
> major mode has to call, right?  Oh and probably something like
> `treesit-enable-p` function (or maybe `treesit-enable` can return
> whether it enabled the treesit support).
> 
> So the major mode code could look like in the patch below?

Ok, I pushed the change. I didn’t move as many setup in js-mode as you did in 
the patch, because I think some of them are still needed? For example, filling. 
Js-mode’s tree-sitter code doesn’t provide filling right now, so we should 
setup filling regardless of tree-sitter.

Yuan





reply via email to

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