mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
C/C++ highlights: Small improvements for type definitions
This commit is contained in:
parent
26cb05f205
commit
f803c74ebc
2 changed files with 6 additions and 0 deletions
|
|
@ -26,9 +26,12 @@
|
||||||
declarator: (field_identifier) @definition.field)
|
declarator: (field_identifier) @definition.field)
|
||||||
(type_definition
|
(type_definition
|
||||||
declarator: (type_identifier) @definition.type)
|
declarator: (type_identifier) @definition.type)
|
||||||
|
(struct_specifier
|
||||||
|
name: (type_identifier) @definition.type)
|
||||||
|
|
||||||
;; References
|
;; References
|
||||||
(identifier) @reference
|
(identifier) @reference
|
||||||
|
(type_identifier) @reference
|
||||||
|
|
||||||
;; Scope
|
;; Scope
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@
|
||||||
name: (scoped_type_identifier
|
name: (scoped_type_identifier
|
||||||
name: (type_identifier) @definition.type))
|
name: (type_identifier) @definition.type))
|
||||||
|
|
||||||
|
(alias_declaration
|
||||||
|
name: (type_identifier) @definition.type)
|
||||||
|
|
||||||
;; Function defintions
|
;; Function defintions
|
||||||
(template_function
|
(template_function
|
||||||
name: (identifier) @definition.function) @scope
|
name: (identifier) @definition.function) @scope
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue