mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
highlights(zig): function return type, var decl type
This commit is contained in:
parent
cb5059e68f
commit
d5116feefd
1 changed files with 14 additions and 1 deletions
|
|
@ -15,7 +15,8 @@
|
||||||
name: (identifier) @function)
|
name: (identifier) @function)
|
||||||
|
|
||||||
(function_declaration
|
(function_declaration
|
||||||
name: (identifier) @function)
|
name: (identifier) @function
|
||||||
|
return: (identifier) @type)
|
||||||
|
|
||||||
; Function calls
|
; Function calls
|
||||||
(call_expression
|
(call_expression
|
||||||
|
|
@ -29,9 +30,11 @@
|
||||||
function: ((identifier) @include
|
function: ((identifier) @include
|
||||||
(#any-of? @include "@import" "@cImport"))
|
(#any-of? @include "@import" "@cImport"))
|
||||||
)
|
)
|
||||||
|
|
||||||
(struct_construction
|
(struct_construction
|
||||||
(type_identifier) @constructor
|
(type_identifier) @constructor
|
||||||
)
|
)
|
||||||
|
|
||||||
;; other identifiers
|
;; other identifiers
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
(custom_number_type) @type.builtin
|
(custom_number_type) @type.builtin
|
||||||
|
|
@ -41,6 +44,16 @@
|
||||||
(union_identifier) @field
|
(union_identifier) @field
|
||||||
(error_identifier) @field
|
(error_identifier) @field
|
||||||
|
|
||||||
|
(assignment_statement
|
||||||
|
name: (identifier) @type
|
||||||
|
expression: [
|
||||||
|
(enum_expression)
|
||||||
|
(union_expression)
|
||||||
|
(error_expression)
|
||||||
|
(struct_expression)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
(line_comment) @comment
|
(line_comment) @comment
|
||||||
(doc_comment) @comment
|
(doc_comment) @comment
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue