mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(c): update highlights
This commit is contained in:
parent
15129f6d70
commit
acd9d2115d
1 changed files with 40 additions and 3 deletions
|
|
@ -17,6 +17,7 @@
|
|||
"sizeof"
|
||||
"offsetof"
|
||||
] @keyword.operator
|
||||
(alignof_expression . _ @keyword.operator)
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
|
|
@ -142,8 +143,9 @@
|
|||
(storage_class_specifier) @storageclass
|
||||
|
||||
[
|
||||
(type_qualifier)
|
||||
(type_qualifier)
|
||||
(gnu_asm_qualifier)
|
||||
"__extension__"
|
||||
] @type.qualifier
|
||||
|
||||
(linkage_specification
|
||||
|
|
@ -166,9 +168,44 @@
|
|||
value: (identifier) @constant)
|
||||
|
||||
((identifier) @constant.builtin
|
||||
(#any-of? @constant.builtin "stderr" "stdin" "stdout"))
|
||||
(#any-of? @constant.builtin
|
||||
"stderr" "stdin" "stdout"
|
||||
"__FILE__" "__LINE__" "__DATE__" "__TIME__"
|
||||
"__STDC__" "__STDC_VERSION__" "__STDC_HOSTED__"
|
||||
"__cplusplus" "__OBJC__" "__ASSEMBLER__"
|
||||
"__BASE_FILE__" "__FILE_NAME__" "__INCLUDE_LEVEL__"
|
||||
"__TIMESTAMP__" "__clang__" "__clang_major__"
|
||||
"__clang_minor__" "__clang_patchlevel__"
|
||||
"__clang_version__" "__clang_literal_encoding__"
|
||||
"__clang_wide_literal_encoding__"
|
||||
"__FUNCTION__" "__func__" "__PRETTY_FUNCTION__"
|
||||
"__VA_ARGS__" "__VA_OPT__"))
|
||||
(preproc_def (preproc_arg) @constant.builtin
|
||||
(#any-of? @constant.builtin "stderr" "stdin" "stdout"))
|
||||
(#any-of? @constant.builtin
|
||||
"stderr" "stdin" "stdout"
|
||||
"__FILE__" "__LINE__" "__DATE__" "__TIME__"
|
||||
"__STDC__" "__STDC_VERSION__" "__STDC_HOSTED__"
|
||||
"__cplusplus" "__OBJC__" "__ASSEMBLER__"
|
||||
"__BASE_FILE__" "__FILE_NAME__" "__INCLUDE_LEVEL__"
|
||||
"__TIMESTAMP__" "__clang__" "__clang_major__"
|
||||
"__clang_minor__" "__clang_patchlevel__"
|
||||
"__clang_version__" "__clang_literal_encoding__"
|
||||
"__clang_wide_literal_encoding__"
|
||||
"__FUNCTION__" "__func__" "__PRETTY_FUNCTION__"
|
||||
"__VA_ARGS__" "__VA_OPT__"))
|
||||
|
||||
(attribute_specifier
|
||||
(argument_list (identifier) @variable.builtin))
|
||||
((attribute_specifier
|
||||
(argument_list (call_expression
|
||||
function: (identifier) @variable.builtin))))
|
||||
|
||||
((call_expression
|
||||
function: (identifier) @function.builtin)
|
||||
(#lua-match? @function.builtin "^__builtin_"))
|
||||
((call_expression
|
||||
function: (identifier) @function.builtin)
|
||||
(#has-ancestor? @function.builtin attribute_specifier))
|
||||
|
||||
;; Preproc def / undef
|
||||
(preproc_def
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue