highlights(c): use more specific groups

Co-Authored-By: Stephan Seitz <stephan.seitz@fau.de>
This commit is contained in:
ObserverOfTime 2022-10-22 11:07:47 +03:00
parent 53c26dd4af
commit 7ce62670b2

View file

@ -2,21 +2,16 @@
((identifier) @variable (#set! "priority" 95)) ((identifier) @variable (#set! "priority" 95))
[ [
"const"
"default" "default"
"enum" "enum"
"extern"
"inline"
"static"
"struct" "struct"
"typedef" "typedef"
"union" "union"
"volatile"
"goto" "goto"
"register"
] @keyword ] @keyword
"sizeof" @keyword.operator "sizeof" @keyword.operator
"return" @keyword.return "return" @keyword.return
[ [
@ -34,7 +29,6 @@
"switch" "switch"
] @conditional ] @conditional
"#define" @constant.macro
[ [
"#if" "#if"
"#ifdef" "#ifdef"
@ -45,6 +39,8 @@
(preproc_directive) (preproc_directive)
] @preproc ] @preproc
"#define" @define
"#include" @include "#include" @include
[ ";" ":" "," ] @punctuation.delimiter [ ";" ":" "," ] @punctuation.delimiter
@ -139,7 +135,12 @@
(type_descriptor) (type_descriptor)
] @type ] @type
(sizeof_expression value: (parenthesized_expression (identifier) @type)) (storage_class_specifier) @storageclass
(type_qualifier) @type.qualifier
(type_definition
declarator: (type_identifier) @type.definition)
((identifier) @constant ((identifier) @constant
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) (#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))