mirror of https://github.com/helix-editor/helix
chore: updated c,c++ highlights (#13747)
parent
3b7aaddb13
commit
62f270e5d2
|
@ -14,8 +14,6 @@
|
|||
] @keyword.storage.type
|
||||
|
||||
[
|
||||
"extern"
|
||||
"register"
|
||||
(type_qualifier)
|
||||
(storage_class_specifier)
|
||||
] @keyword.storage.modifier
|
||||
|
@ -55,8 +53,11 @@
|
|||
(preproc_directive)
|
||||
] @keyword.directive
|
||||
|
||||
(pointer_declarator "*" @type.builtin)
|
||||
(abstract_pointer_declarator "*" @type.builtin)
|
||||
"..." @punctuation
|
||||
|
||||
["," "." ":" "::" ";" "->"] @punctuation.delimiter
|
||||
|
||||
["(" ")" "[" "]" "{" "}" "[[" "]]"] @punctuation.bracket
|
||||
|
||||
[
|
||||
"+"
|
||||
|
@ -95,13 +96,11 @@
|
|||
"?"
|
||||
] @operator
|
||||
|
||||
(conditional_expression ":" @operator)
|
||||
(conditional_expression ":" @operator) ; After punctuation
|
||||
|
||||
"..." @punctuation
|
||||
(pointer_declarator "*" @type.builtin) ; After Operators
|
||||
(abstract_pointer_declarator "*" @type.builtin)
|
||||
|
||||
["," "." ":" ";" "->" "::"] @punctuation.delimiter
|
||||
|
||||
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||
|
||||
[(true) (false)] @constant.builtin.boolean
|
||||
|
||||
|
|
|
@ -23,11 +23,6 @@
|
|||
|
||||
; Functions
|
||||
|
||||
; These casts are parsed as function calls, but are not.
|
||||
((identifier) @keyword (#eq? @keyword "static_cast"))
|
||||
((identifier) @keyword (#eq? @keyword "dynamic_cast"))
|
||||
((identifier) @keyword (#eq? @keyword "reinterpret_cast"))
|
||||
((identifier) @keyword (#eq? @keyword "const_cast"))
|
||||
|
||||
(call_expression
|
||||
function: (qualified_identifier
|
||||
|
@ -39,6 +34,8 @@
|
|||
(template_method
|
||||
name: (field_identifier) @function)
|
||||
|
||||
; Support up to 3 levels of nesting of qualifiers
|
||||
; i.e. a::b::c::func();
|
||||
(function_declarator
|
||||
declarator: (qualified_identifier
|
||||
name: (identifier) @function))
|
||||
|
@ -48,6 +45,12 @@
|
|||
name: (qualified_identifier
|
||||
name: (identifier) @function)))
|
||||
|
||||
(function_declarator
|
||||
declarator: (qualified_identifier
|
||||
name: (qualified_identifier
|
||||
name: (qualified_identifier
|
||||
name: (identifier) @function))))
|
||||
|
||||
(function_declarator
|
||||
declarator: (field_identifier) @function)
|
||||
|
||||
|
@ -72,6 +75,13 @@
|
|||
"()"
|
||||
] @operator
|
||||
|
||||
|
||||
; These casts are parsed as function calls, but are not.
|
||||
((identifier) @keyword (#eq? @keyword "static_cast"))
|
||||
((identifier) @keyword (#eq? @keyword "dynamic_cast"))
|
||||
((identifier) @keyword (#eq? @keyword "reinterpret_cast"))
|
||||
((identifier) @keyword (#eq? @keyword "const_cast"))
|
||||
|
||||
[
|
||||
"co_await"
|
||||
"co_return"
|
||||
|
|
|
@ -131,8 +131,8 @@
|
|||
"try"
|
||||
"except"
|
||||
"finally"
|
||||
] @keyword.control.except
|
||||
(raise_statement "from" @keyword.control.except)
|
||||
] @keyword.control.exception
|
||||
(raise_statement "from" @keyword.control.exception)
|
||||
|
||||
; Functions
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue