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))
[
"const"
"default"
"enum"
"extern"
"inline"
"static"
"struct"
"typedef"
"union"
"volatile"
"goto"
"register"
] @keyword
"sizeof" @keyword.operator
"return" @keyword.return
[
@ -34,7 +29,6 @@
"switch"
] @conditional
"#define" @constant.macro
[
"#if"
"#ifdef"
@ -45,6 +39,8 @@
(preproc_directive)
] @preproc
"#define" @define
"#include" @include
[ ";" ":" "," ] @punctuation.delimiter
@ -139,7 +135,12 @@
(type_descriptor)
] @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
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))