mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
feat(highlights)!: remove non-keyword @type.qualifier
* blueprint: Don't specially highlight template_name_qualifier. This is similar to inheritance base class. Other languages don't highlight them specially. * eds: `@type` for all `*Type` keys * chatito: `@attribute` for variation
This commit is contained in:
parent
dccf31f9b1
commit
5d75359a9a
4 changed files with 2 additions and 20 deletions
|
|
@ -139,7 +139,6 @@ As languages differ quite a lot, here is a set of captures available to you when
|
||||||
@type ; type or class definitions and annotations
|
@type ; type or class definitions and annotations
|
||||||
@type.builtin ; built-in types
|
@type.builtin ; built-in types
|
||||||
@type.definition ; identifiers in type definitions (e.g. `typedef <type> <identifier>` in C)
|
@type.definition ; identifiers in type definitions (e.g. `typedef <type> <identifier>` in C)
|
||||||
@type.qualifier ; type qualifiers (e.g. `const`)
|
|
||||||
|
|
||||||
@attribute ; attribute annotations (e.g. Python decorators)
|
@attribute ; attribute annotations (e.g. Python decorators)
|
||||||
@attribute.builtin ; builtin annotations (e.g. `@property` in Python)
|
@attribute.builtin ; builtin annotations (e.g. `@property` in Python)
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,6 @@
|
||||||
(menu_item
|
(menu_item
|
||||||
"item" @function.macro)
|
"item" @function.macro)
|
||||||
|
|
||||||
(template_definition
|
|
||||||
(template_name_qualifier) @type.qualifier)
|
|
||||||
|
|
||||||
(import_statement
|
(import_statement
|
||||||
(gobject_library) @module)
|
(gobject_library) @module)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
(slot) @type
|
(slot) @type
|
||||||
|
|
||||||
(variation) @type.qualifier
|
(variation) @attribute
|
||||||
|
|
||||||
(alias) @keyword.directive
|
(alias) @keyword.directive
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,21 +27,7 @@
|
||||||
(section_name) @_name
|
(section_name) @_name
|
||||||
(statement
|
(statement
|
||||||
(key) @_key) @type
|
(key) @_key) @type
|
||||||
(#match? @_key "\\c^ObjectType$")
|
(#match? @_key "\\c^(ObjectType|DataType|AccessType)$")
|
||||||
(#not-match? @_name "\\c^Comments$"))
|
|
||||||
|
|
||||||
(section
|
|
||||||
(section_name) @_name
|
|
||||||
(statement
|
|
||||||
(key) @_key) @type
|
|
||||||
(#match? @_key "\\c^DataType$")
|
|
||||||
(#not-match? @_name "\\c^Comments$"))
|
|
||||||
|
|
||||||
(section
|
|
||||||
(section_name) @_name
|
|
||||||
(statement
|
|
||||||
(key) @_key) @type.qualifier
|
|
||||||
(#match? @_key "\\c^AccessType$")
|
|
||||||
(#not-match? @_name "\\c^Comments$"))
|
(#not-match? @_name "\\c^Comments$"))
|
||||||
|
|
||||||
(section
|
(section
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue