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
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/
Issue Overview
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 inexport MOUNTS
is uncommented:Reproducible example
Screenshots
ZED without any extensions:
OK
BROKEN
For reference, I've also tried installing d1y/bash.zed (extensions/basher) & rburmorrison/shell.zed (extensions/shell) but either behaves identically as ZED with no extensions
Environment
Zed: v0.159.7 (Zed)
OS: Arch Linux Wayland
Memory: 62.6 GiB
Architecture: x86_64
GPU: AMD Radeon RX 7900 XT (RADV NAVI31) || radv || Mesa 24.1.3-arch1.1
The text was updated successfully, but these errors were encountered: