mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
Do not highlight Uppercase function as type
This commit is contained in:
parent
3674ad89df
commit
289cdc9da8
2 changed files with 6 additions and 4 deletions
|
|
@ -121,7 +121,7 @@
|
||||||
|
|
||||||
(((field_expression
|
(((field_expression
|
||||||
(field_identifier) @property)) @_parent
|
(field_identifier) @property)) @_parent
|
||||||
(not-has-parent? @_parent template_method function_declarator call_expression))
|
(#not-has-parent? @_parent template_method function_declarator call_expression))
|
||||||
(statement_identifier) @label
|
(statement_identifier) @label
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,16 @@
|
||||||
|
|
||||||
(((field_expression
|
(((field_expression
|
||||||
(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))
|
||||||
|
|
||||||
(template_function
|
(template_function
|
||||||
name: (scoped_identifier
|
name: (scoped_identifier
|
||||||
name: (identifier) @function))
|
name: (identifier) @function))
|
||||||
|
|
||||||
|
|
||||||
((identifier) @type (#match? @type "^[A-Z]"))
|
((identifier) @type
|
||||||
|
(#match? @type "^[A-Z]")
|
||||||
|
(#not-has-parent? @type function_declarator))
|
||||||
|
|
||||||
(namespace_identifier) @namespace
|
(namespace_identifier) @namespace
|
||||||
((namespace_identifier) @type
|
((namespace_identifier) @type
|
||||||
|
|
@ -148,5 +150,5 @@
|
||||||
; Annotations (not fully supported by parser)
|
; Annotations (not fully supported by parser)
|
||||||
|
|
||||||
((ERROR) @attribute
|
((ERROR) @attribute
|
||||||
(vim-match? @attribute "\[?\[.*\]\]?.*$"))
|
(#vim-match? @attribute "\[?\[.*\]\]?.*$"))
|
||||||
(attribute) @attribute
|
(attribute) @attribute
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue