mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 04:50:03 -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
|
||||
(#has-parent? @_parent template_method function_declarator call_expression))
|
||||
|
||||
(field_declaration
|
||||
(field_identifier) @field)
|
||||
|
||||
(field_initializer
|
||||
(field_identifier) @property)
|
||||
|
||||
|
|
@ -31,7 +34,10 @@
|
|||
declarator: (field_identifier) @method)
|
||||
|
||||
(concept_definition
|
||||
name: (identifier) @type)
|
||||
name: (identifier) @type.definition)
|
||||
|
||||
(alias_declaration
|
||||
name: (type_identifier) @type.definition)
|
||||
|
||||
(namespace_identifier) @namespace
|
||||
((namespace_identifier) @type
|
||||
|
|
@ -127,28 +133,27 @@
|
|||
[
|
||||
"class"
|
||||
"decltype"
|
||||
"constexpr"
|
||||
"explicit"
|
||||
"final"
|
||||
"friend"
|
||||
"mutable"
|
||||
"namespace"
|
||||
"override"
|
||||
"private"
|
||||
"protected"
|
||||
"public"
|
||||
"template"
|
||||
"typename"
|
||||
"using"
|
||||
"virtual"
|
||||
"co_await"
|
||||
"concept"
|
||||
"requires"
|
||||
"consteval"
|
||||
"constinit"
|
||||
(auto)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"public"
|
||||
"private"
|
||||
"protected"
|
||||
"virtual"
|
||||
"final"
|
||||
] @type.qualifier
|
||||
|
||||
[
|
||||
"co_yield"
|
||||
"co_return"
|
||||
|
|
@ -175,4 +180,7 @@
|
|||
|
||||
"::" @punctuation.delimiter
|
||||
|
||||
(template_argument_list
|
||||
["<" ">"] @punctuation.bracket)
|
||||
|
||||
(literal_suffix) @operator
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
template <class T, class U>
|
||||
concept Derived = std::is_base_of<U, T>::value;
|
||||
// ^ keyword
|
||||
// ^ type
|
||||
// ^ type.definition
|
||||
|
||||
template<typename T>
|
||||
concept Hashable = requires(T a) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue