[Top][All Lists]

[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 14:47:02 +0200

> From: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>
> Date: Wed, 2 Nov 2022 12:55:31 -0600
> I missed the update that adds override as the last argument of the capture 
> function. Fixed now.
> On Wed, Nov 2, 2022 at 12:22 PM João Paulo Labegalini de Carvalho 
> <jaopaulolc@gmail.com> wrote:
>  Here is another version of the path. This has the queries separated into 
> language related terms and
>  groups them into lists of features.
>  Looking forward to your feedback.
>  Thanks.
>  On Thu, Oct 27, 2022 at 4:01 PM João Paulo Labegalini de Carvalho 
> <jaopaulolc@gmail.com> wrote:
>  Hi everyone,
>  Please find the patch for enabling fontification in sh-mode (currently only 
> for bash) using
>  tree-sitter.
>  I welcome all comments and suggestions to improve the patch.
>  I noticed a weird behavior with heredocs. Take the code below:
>  echo <<EOF
>  This is a here document.
>  EOF
>  echo "Done."
>  My patch correctly fontifies the code above, but if I kill the whole line 
> with the "This is a here
>  document." text, then the sh-heredoc face bleeds out and all the subsequent 
> comments get
>  fontified as part of the heredoc.
>  A similar behavior happens if tree-sitter is not enabled, if the heredoc is 
> empty then all
>  subsequent commands are fontified as heredoc. However, as soon as anything 
> is added to the
>  heredoc, then everything goes back to the correct fontification. 
>  Such "refreshing" does not happen with tree-sitter enabled, but if I execute 
> M-x sh-mode then the
>  buffer gets refreshed and everything looks good.
>  What am I doing wrong?

Yuan, any comments?  If you think this is OK for the tree-sitter
branch, please install there.

reply via email to

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