mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
highlights(c): use more specific groups
Co-Authored-By: Stephan Seitz <stephan.seitz@fau.de>
This commit is contained in:
parent
53c26dd4af
commit
7ce62670b2
1 changed files with 9 additions and 8 deletions
|
|
@ -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_]+$"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue