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: Wed, 26 Oct 2022 18:56:44 -0700


> On Oct 25, 2022, at 3:49 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>> 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.
> 
> Yes, there are indeed some non-trivial tradeoffs here.

Reading some old bug report made me realize another problem: what if a 
derived-mode of js-mode, A-mode expects cc-mode stuff to be setup by js-mode, 
but js-mode doesn’t setup cc-mode because it’s using tree-sitter?

But if A-mode uses tree-sitter too, then it wouldn’t want js-mode to setup 
cc-mode. So it seems A-mode needs a way to control whether it wants its parent 
mode(s) to setup tree-sitter or not.

One way would be adding another flag in treesit-settings, which controls 
whether this mode’s parent should setup tree-sitter.

Yuan


reply via email to

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