mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
chore: update C, improve preproc_arg highlights
This commit is contained in:
parent
f590e13d6d
commit
6aababfca4
2 changed files with 9 additions and 1 deletions
|
|
@ -33,7 +33,7 @@
|
|||
"revision": "7f1a5df44861291d6951b6b2146a9fef4c226e14"
|
||||
},
|
||||
"c": {
|
||||
"revision": "ad095896dd223f1c22b85ac5ec84ab11fb732b07"
|
||||
"revision": "28d910c52e701ff3414d3d99c1c2be21d694dbee"
|
||||
},
|
||||
"c_sharp": {
|
||||
"revision": "1648e21b4f087963abf0101ee5221bb413107b07"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
; Lower priority to prefer @parameter when identifier appears in parameter_declaration.
|
||||
((identifier) @variable (#set! "priority" 95))
|
||||
(preproc_def (preproc_arg) @variable)
|
||||
|
||||
[
|
||||
"default"
|
||||
|
|
@ -157,6 +158,8 @@
|
|||
|
||||
((identifier) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))
|
||||
(preproc_def (preproc_arg) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))
|
||||
(enumerator
|
||||
name: (identifier) @constant)
|
||||
(case_statement
|
||||
|
|
@ -164,6 +167,8 @@
|
|||
|
||||
((identifier) @constant.builtin
|
||||
(#any-of? @constant.builtin "stderr" "stdin" "stdout"))
|
||||
(preproc_def (preproc_arg) @constant.builtin
|
||||
(#any-of? @constant.builtin "stderr" "stdin" "stdout"))
|
||||
|
||||
;; Preproc def / undef
|
||||
(preproc_def
|
||||
|
|
@ -196,6 +201,9 @@
|
|||
(parameter_declaration
|
||||
declarator: (identifier) @parameter)
|
||||
|
||||
(parameter_declaration
|
||||
declarator: (array_declarator) @parameter)
|
||||
|
||||
(parameter_declaration
|
||||
declarator: (pointer_declarator) @parameter)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue