A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00127.html below:

Re: Initial fontification in sh-mode with tree-sittter

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:

This is a here document.

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?



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4