mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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)
|
||||
|
||||
(variable_assignment
|
||||
(word) @symbol)
|
||||
(variable_assignment [
|
||||
"?="
|
||||
":="
|
||||
"+="
|
||||
"="
|
||||
name: (word) @symbol
|
||||
[
|
||||
"?="
|
||||
":="
|
||||
"::="
|
||||
; ":::="
|
||||
"+="
|
||||
"="
|
||||
] @operator)
|
||||
|
||||
(shell_assignment
|
||||
name: (word) @symbol
|
||||
"!=" @operator)
|
||||
|
||||
(define_directive
|
||||
"define" @keyword
|
||||
name: (word) @symbol
|
||||
[
|
||||
"="
|
||||
":="
|
||||
"::="
|
||||
; ":::="
|
||||
"?="
|
||||
"!="
|
||||
]? @operator
|
||||
"endef" @keyword)
|
||||
|
||||
(variable_assignment
|
||||
(word) @variable.builtin
|
||||
(#any-of? @variable.builtin
|
||||
(word) @variable.builtin (#any-of? @variable.builtin
|
||||
".DEFAULT_GOAL"
|
||||
".EXTRA_PREREQS"
|
||||
".FEATURES"
|
||||
|
|
@ -65,11 +82,9 @@
|
|||
"SHELL"
|
||||
))
|
||||
|
||||
|
||||
; Use string to match bash
|
||||
(variable_reference (word) @string) @operator
|
||||
|
||||
|
||||
(shell_function
|
||||
["$" "(" ")"] @operator
|
||||
"shell" @function.builtin)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue