[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initial fontification in sh-mode with tree-sittter
From: |
Eli Zaretskii |
Subject: |
Re: Initial fontification in sh-mode with tree-sittter |
Date: |
Sat, 12 Nov 2022 21:53:52 +0200 |
> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 12 Nov 2022 11:45:53 -0800
> Cc: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>,
> emacs-devel@gnu.org
>
> > Yuan, any comments? If you think this is OK for the tree-sitter
> > branch, please install there.
>
> I think there are still some details need to be addressed, eg,
>
> > Also, when defining sh-mode--treesit-settings, instead of using the value
> > sh-shell as the language, it’s better to just use ‘bash. Here is what
> > happened to me: my default value for sh-shell is fish, so
> > sh-mode--treesit-settings was defined with language = fish. When I open
> > heredoc-issue.sh, sh-mode parses the shebang and sets sh-shell to bash.
> > Since bash does have a parser, (treesit-ready-p ’sh-mode sh-shell) returns
> > t, and tree-sitter is activated. However when font-lock tries to use the
> > query, it errors because query tries to load a parser for fish.
>
> (I can make the change myself though)
Fine with me, it's up to you two.
Thanks.
Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/01
Re: Initial fontification in sh-mode with tree-sittter, João Paulo Labegalini de Carvalho, 2022/11/02