mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
fix(fish): update for upstream changes
https://github.com/ram02z/tree-sitter-fish/pull/16 Co-authored-by: taekwombo <taekwombo@users.noreply.github.com>
This commit is contained in:
parent
554260cdbe
commit
b79c763c03
1 changed files with 11 additions and 6 deletions
|
|
@ -7,15 +7,21 @@
|
||||||
"||"
|
"||"
|
||||||
"|"
|
"|"
|
||||||
"&"
|
"&"
|
||||||
"="
|
|
||||||
"!="
|
|
||||||
".."
|
".."
|
||||||
"!"
|
"!"
|
||||||
(direction)
|
(direction)
|
||||||
(stream_redirect)
|
(stream_redirect)
|
||||||
(test_option)
|
|
||||||
] @operator
|
] @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"
|
"not"
|
||||||
"and"
|
"and"
|
||||||
|
|
@ -103,7 +109,7 @@
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
(command_substitution_dollar "$" @punctuation.bracket)
|
(command_substitution "$" @punctuation.bracket)
|
||||||
|
|
||||||
; non-bultin command names
|
; non-bultin command names
|
||||||
(command name: (word) @function.call)
|
(command name: (word) @function.call)
|
||||||
|
|
@ -116,7 +122,7 @@
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
(test_command "test" @function.builtin)
|
(test_command (word) @function.builtin)
|
||||||
|
|
||||||
;; Functions
|
;; Functions
|
||||||
|
|
||||||
|
|
@ -150,7 +156,6 @@
|
||||||
[(integer) (float)] @number
|
[(integer) (float)] @number
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
(comment) @spell
|
(comment) @spell
|
||||||
(test_option) @string
|
|
||||||
|
|
||||||
((word) @boolean
|
((word) @boolean
|
||||||
(#any-of? @boolean "true" "false"))
|
(#any-of? @boolean "true" "false"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue