aboutsummaryrefslogtreecommitdiffstats
path: root/queries/fish
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2023-04-21 04:06:20 -0400
committerAmaan Qureshi <amaanq12@gmail.com>2023-04-21 18:24:17 -0400
commit85330918f05b3a4bd342a69063e7ef5fcdfadd2e (patch)
tree6b38f8e3af9ad1079ba94ffc7056263b056d0c00 /queries/fish
parentfix(c): types are optional in sized_type_specifier (diff)
downloadnvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.gz
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.bz2
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.lz
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.xz
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.tar.zst
nvim-treesitter-85330918f05b3a4bd342a69063e7ef5fcdfadd2e.zip
perf: remove match where possible
Diffstat (limited to 'queries/fish')
-rw-r--r--queries/fish/highlights.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/queries/fish/highlights.scm b/queries/fish/highlights.scm
index 91978e148..d12cbd781 100644
--- a/queries/fish/highlights.scm
+++ b/queries/fish/highlights.scm
@@ -15,12 +15,12 @@
;; match operators of test command
(command
- name: (word) @function.builtin (#match? @function.builtin "^test$")
+ name: (word) @function.builtin (#eq? @function.builtin "test")
argument: (word) @operator (#match? @operator "^(!?\\=|-[a-zA-Z]+)$"))
;; match operators of [ command
(command
- name: (word) @punctuation.bracket (#match? @punctuation.bracket "^\\[$")
+ name: (word) @punctuation.bracket (#eq? @punctuation.bracket "[")
argument: (word) @operator (#match? @operator "^(!?\\=|-[a-zA-Z]+)$"))
[
@@ -106,7 +106,7 @@
(command
argument: [
- (word) @parameter (#match? @parameter "^-")
+ (word) @parameter (#lua-match? @parameter "^[-]")
]
)
@@ -137,7 +137,7 @@
option: [
(word)
(concatenation (word))
- ] @parameter (#match? @parameter "^-")
+ ] @parameter (#lua-match? @parameter "^[-]")
)
;; Strings
@@ -160,7 +160,7 @@
(#any-of? @boolean "true" "false"))
((program . (comment) @preproc)
- (#match? @preproc "^#!/"))
+ (#lua-match? @preproc "^#!/"))
;; Error