mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
highlights(cpp): use more specific groups
This commit is contained in:
parent
7ce62670b2
commit
79705a1f80
2 changed files with 19 additions and 11 deletions
|
|
@ -24,6 +24,9 @@
|
||||||
(field_identifier) @method)) @_parent
|
(field_identifier) @method)) @_parent
|
||||||
(#has-parent? @_parent template_method function_declarator call_expression))
|
(#has-parent? @_parent template_method function_declarator call_expression))
|
||||||
|
|
||||||
|
(field_declaration
|
||||||
|
(field_identifier) @field)
|
||||||
|
|
||||||
(field_initializer
|
(field_initializer
|
||||||
(field_identifier) @property)
|
(field_identifier) @property)
|
||||||
|
|
||||||
|
|
@ -31,7 +34,10 @@
|
||||||
declarator: (field_identifier) @method)
|
declarator: (field_identifier) @method)
|
||||||
|
|
||||||
(concept_definition
|
(concept_definition
|
||||||
name: (identifier) @type)
|
name: (identifier) @type.definition)
|
||||||
|
|
||||||
|
(alias_declaration
|
||||||
|
name: (type_identifier) @type.definition)
|
||||||
|
|
||||||
(namespace_identifier) @namespace
|
(namespace_identifier) @namespace
|
||||||
((namespace_identifier) @type
|
((namespace_identifier) @type
|
||||||
|
|
@ -127,28 +133,27 @@
|
||||||
[
|
[
|
||||||
"class"
|
"class"
|
||||||
"decltype"
|
"decltype"
|
||||||
"constexpr"
|
|
||||||
"explicit"
|
"explicit"
|
||||||
"final"
|
|
||||||
"friend"
|
"friend"
|
||||||
"mutable"
|
|
||||||
"namespace"
|
"namespace"
|
||||||
"override"
|
"override"
|
||||||
"private"
|
|
||||||
"protected"
|
|
||||||
"public"
|
|
||||||
"template"
|
"template"
|
||||||
"typename"
|
"typename"
|
||||||
"using"
|
"using"
|
||||||
"virtual"
|
|
||||||
"co_await"
|
"co_await"
|
||||||
"concept"
|
"concept"
|
||||||
"requires"
|
"requires"
|
||||||
"consteval"
|
|
||||||
"constinit"
|
|
||||||
(auto)
|
(auto)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"public"
|
||||||
|
"private"
|
||||||
|
"protected"
|
||||||
|
"virtual"
|
||||||
|
"final"
|
||||||
|
] @type.qualifier
|
||||||
|
|
||||||
[
|
[
|
||||||
"co_yield"
|
"co_yield"
|
||||||
"co_return"
|
"co_return"
|
||||||
|
|
@ -175,4 +180,7 @@
|
||||||
|
|
||||||
"::" @punctuation.delimiter
|
"::" @punctuation.delimiter
|
||||||
|
|
||||||
|
(template_argument_list
|
||||||
|
["<" ">"] @punctuation.bracket)
|
||||||
|
|
||||||
(literal_suffix) @operator
|
(literal_suffix) @operator
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
concept Derived = std::is_base_of<U, T>::value;
|
concept Derived = std::is_base_of<U, T>::value;
|
||||||
// ^ keyword
|
// ^ keyword
|
||||||
// ^ type
|
// ^ type.definition
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
concept Hashable = requires(T a) {
|
concept Hashable = requires(T a) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue