mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
fixes golang method highlights (overwritten by parameter in the ordering)
This commit is contained in:
parent
d54fe4545b
commit
954b8c718f
1 changed files with 15 additions and 15 deletions
|
|
@ -2,6 +2,21 @@
|
||||||
;; Copyright (c) 2014 Max Brunsfeld (The MIT License)
|
;; Copyright (c) 2014 Max Brunsfeld (The MIT License)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
; Identifiers
|
||||||
|
|
||||||
|
(type_identifier) @type
|
||||||
|
(field_identifier) @property
|
||||||
|
(identifier) @variable
|
||||||
|
|
||||||
|
(parameter_declaration (identifier) @parameter)
|
||||||
|
(variadic_parameter_declaration (identifier) @parameter)
|
||||||
|
|
||||||
|
((identifier) @constant
|
||||||
|
(#eq? @constant "_"))
|
||||||
|
|
||||||
|
((identifier) @constant
|
||||||
|
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
||||||
|
|
||||||
; Function calls
|
; Function calls
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
|
|
@ -19,21 +34,6 @@
|
||||||
(method_declaration
|
(method_declaration
|
||||||
name: (field_identifier) @method)
|
name: (field_identifier) @method)
|
||||||
|
|
||||||
; Identifiers
|
|
||||||
|
|
||||||
(type_identifier) @type
|
|
||||||
(field_identifier) @property
|
|
||||||
(identifier) @variable
|
|
||||||
|
|
||||||
(parameter_declaration (identifier) @parameter)
|
|
||||||
(variadic_parameter_declaration (identifier) @parameter)
|
|
||||||
|
|
||||||
((identifier) @constant
|
|
||||||
(#eq? @constant "_"))
|
|
||||||
|
|
||||||
((identifier) @constant
|
|
||||||
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
"--" @operator
|
"--" @operator
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue