[Top][All Lists]

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

Re: Call for volunteers: add tree-sitter support to major modes

From: Yuan Fu
Subject: Re: Call for volunteers: add tree-sitter support to major modes
Date: Mon, 10 Oct 2022 10:53:54 -0700

> On Oct 10, 2022, at 10:16 AM, Yuan Fu <casouri@gmail.com> wrote:
>> On Oct 10, 2022, at 9:29 AM, Theodor Thornhill <theo@thornhill.no> wrote:
>>>> I added some variartion of this.  I think also message is better,
>>>> because user-error makes the logic a little harder.  What do you
>>>> think?
>>> Yeah user-error is mostly the same as a message, since nobody (I
>>> think) turns on beeping anymore. Though I hope there is a way to warn
>>> users that’s not missable. Messages (and user-error) could be covered
>>> by later messages. Hmm, maybe we can use warnings.
>>> For template string please see that patch that applies on top of your
>>> patch. It seems to work for me. (Also see screenshot attached,
>>> brackets have different colors because I forgot to turn off
>>> rainbow-delimiter-mode when taking the shot). Also some of the lines
>>> are longer than 70 columns. Could you wrap those lines?
>> Yeah, it is better, though we still get some bleeding into the parens
>> etc.  Anyway, I think we can tweak this later.
>> Applied your changes, see latest revision.
>> Thanks,
>> Theo
>> <0001-Add-tree-sitter-functionality-to-js-mode.patch>
> Thanks! Looks good, I’ll apply it. BTW, you don’t need to explain what does a 
> function do in the commit message, just what changed. For new functions, you 
> can just say “New function”. And you can merge several entries together, like
> (js--treesit-backward-up-list)
> (js--treesit-indent-rules)
> (js--treesit-keywords)
> (js--treesit-settings): New functions.
> Yuan

Pushed. Please also see the change I made after your patch, for 
beginning/end-of-defun functions I added a new function 
treesit-search-forward-goto which is very handy, it should be faster, simpler 
to use, and wouldn’t get stuck like the old approach. And I changed 
“variable_declarator” to “lexical_declaration”.


reply via email to

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