aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorAlexei Mozaidze <lexerpexer@proton.me>2025-12-03 20:32:06 +0400
committerChristian Clason <ch.clason+github@icloud.com>2025-12-03 17:49:36 +0100
commit857fb97bb65c8a71b0c4a568cfcfef95679854d5 (patch)
tree7a2a32d4dd4be8f18b1cdb9cb5a099cdb3bc2f4c /runtime
parentdocs: document setting foldmethod alongside foldexpr (#8187) (diff)
downloadnvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.tar
nvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.tar.gz
nvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.tar.bz2
nvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.tar.lz
nvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.tar.xz
nvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.tar.zst
nvim-treesitter-857fb97bb65c8a71b0c4a568cfcfef95679854d5.zip
fix(fennel): highlight `$[1-9]` in multi-symbol context properly
Highlights the dollar symbol properly in multi-symbol contexts, like `$3.some.properties`. There was already a fix for a similar issue on #8067, but it only addressed `$.some.properties`, but not the variant with the argument number in it.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/fennel/highlights.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/queries/fennel/highlights.scm b/runtime/queries/fennel/highlights.scm
index c02f7bd14..a70f200dc 100644
--- a/runtime/queries/fennel/highlights.scm
+++ b/runtime/queries/fennel/highlights.scm
@@ -102,13 +102,13 @@
])
((symbol) @variable.parameter
- (#any-of? @variable.parameter "$" "$..."))
+ (#lua-match? @variable.parameter "^%$[1-9]?$"))
((symbol_fragment) @variable.parameter
- (#eq? @variable.parameter "$"))
+ (#lua-match? @variable.parameter "^%$[1-9]?$"))
((symbol) @variable.parameter
- (#lua-match? @variable.parameter "^%$[1-9]$"))
+ (#eq? @variable.parameter "$..."))
((symbol) @operator
(#any-of? @operator