mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
fix(make/highlights): add define and operators
This commit is contained in:
parent
6847ce4f8c
commit
5ac8cf8ee5
1 changed files with 25 additions and 10 deletions
|
|
@ -37,18 +37,35 @@
|
||||||
(include_directive ["include" "-include"] @include)
|
(include_directive ["include" "-include"] @include)
|
||||||
|
|
||||||
(variable_assignment
|
(variable_assignment
|
||||||
(word) @symbol)
|
name: (word) @symbol
|
||||||
(variable_assignment [
|
[
|
||||||
"?="
|
"?="
|
||||||
":="
|
":="
|
||||||
"+="
|
"::="
|
||||||
"="
|
; ":::="
|
||||||
|
"+="
|
||||||
|
"="
|
||||||
] @operator)
|
] @operator)
|
||||||
|
|
||||||
|
(shell_assignment
|
||||||
|
name: (word) @symbol
|
||||||
|
"!=" @operator)
|
||||||
|
|
||||||
|
(define_directive
|
||||||
|
"define" @keyword
|
||||||
|
name: (word) @symbol
|
||||||
|
[
|
||||||
|
"="
|
||||||
|
":="
|
||||||
|
"::="
|
||||||
|
; ":::="
|
||||||
|
"?="
|
||||||
|
"!="
|
||||||
|
]? @operator
|
||||||
|
"endef" @keyword)
|
||||||
|
|
||||||
(variable_assignment
|
(variable_assignment
|
||||||
(word) @variable.builtin
|
(word) @variable.builtin (#any-of? @variable.builtin
|
||||||
(#any-of? @variable.builtin
|
|
||||||
".DEFAULT_GOAL"
|
".DEFAULT_GOAL"
|
||||||
".EXTRA_PREREQS"
|
".EXTRA_PREREQS"
|
||||||
".FEATURES"
|
".FEATURES"
|
||||||
|
|
@ -65,11 +82,9 @@
|
||||||
"SHELL"
|
"SHELL"
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
; Use string to match bash
|
; Use string to match bash
|
||||||
(variable_reference (word) @string) @operator
|
(variable_reference (word) @string) @operator
|
||||||
|
|
||||||
|
|
||||||
(shell_function
|
(shell_function
|
||||||
["$" "(" ")"] @operator
|
["$" "(" ")"] @operator
|
||||||
"shell" @function.builtin)
|
"shell" @function.builtin)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue