You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Syntax Highlight breaks with substring matching #279
Substring matching breaks syntax highlight in ZED (which doesn't happen with VSCode nor GitHub Markdown).
Bash 5.2 enables substring matching by default (see patsub_replacement). This is particularly useful for injecting strings, but only when a $variable is present. In this example --volume=/tmp/mnt:/mnt wont be printed unless item in export MOUNTS is uncommented:
also happens with the % syntax on NeoVim, single liner that removes file extension and breaks tree-sitter: removed=${filename%.*}
syntax highlighting for the entire file is gone, both in bash file and a markdown file containing a bash code block.
I'm getting the following error log, I'm using a nearly unmodified LazyVim:
Error 18:40:35 msg_show.emsg Error in decoration provider treesitter/highlighter.win:
Error executing lua: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 9:4.
Invalid node type "":
"<"
^
stack traceback:
> [C]: in function '_ts_parse_query'
> /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
> /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
> /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'
> /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in function 'new'
> /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:243: in function 'get_query'
> /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:191: in function 'fn'
> /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:491: in function 'for_each_tree'
> /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:495: in function 'for_each_tree'
> /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:495: in function 'for_each_tree'
> /usr/share/nvim/runtime/
Activity
barr-israel commentedon Nov 16, 2024
also happens with the % syntax on NeoVim, single liner that removes file extension and breaks tree-sitter:
removed=${filename%.*}syntax highlighting for the entire file is gone, both in bash file and a markdown file containing a bash code block.
I'm getting the following error log, I'm using a nearly unmodified LazyVim: