mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -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))
|
||||
|
||||
[
|
||||
"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_]+$"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue