aboutsummaryrefslogtreecommitdiffstats
path: root/queries/fish
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2022-11-24 01:23:08 +0100
committerStephan Seitz <stephan.seitz@fau.de>2022-11-24 01:36:18 +0100
commitb79c763c03a236833a60b4865b02412b3e4a9799 (patch)
tree6674a8ad4a053e268e29caca22b822ac9011f93e /queries/fish
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.tar
nvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.tar.gz
nvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.tar.bz2
nvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.tar.lz
nvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.tar.xz
nvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.tar.zst
nvim-treesitter-b79c763c03a236833a60b4865b02412b3e4a9799.zip
fix(fish): update for upstream changes
https://github.com/ram02z/tree-sitter-fish/pull/16 Co-authored-by: taekwombo <taekwombo@users.noreply.github.com>
Diffstat (limited to 'queries/fish')
-rw-r--r--queries/fish/highlights.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/queries/fish/highlights.scm b/queries/fish/highlights.scm
index 10d54dff7..838251201 100644
--- a/queries/fish/highlights.scm
+++ b/queries/fish/highlights.scm
@@ -7,15 +7,21 @@
"||"
"|"
"&"
- "="
- "!="
".."
"!"
(direction)
(stream_redirect)
- (test_option)
] @operator
+; match operators of test command
+(command
+ name: (word) @function (#match? @function "^test$")
+ argument: (word) @operator (#match? @operator "^(!?\\=|-[a-zA-Z]+)$"))
+
+;; match operators of [ command
+(test_command
+ argument: (word) @operator (#match? @operator "^(!?\\=|-[a-zA-Z]+)$"))
+
[
"not"
"and"
@@ -103,7 +109,7 @@
]
)
-(command_substitution_dollar "$" @punctuation.bracket)
+(command_substitution "$" @punctuation.bracket)
; non-bultin command names
(command name: (word) @function.call)
@@ -116,7 +122,7 @@
]
)
-(test_command "test" @function.builtin)
+(test_command (word) @function.builtin)
;; Functions
@@ -150,7 +156,6 @@
[(integer) (float)] @number
(comment) @comment
(comment) @spell
-(test_option) @string
((word) @boolean
(#any-of? @boolean "true" "false"))