mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(go): highlight constructors, remove _ as @constant
This commit is contained in:
parent
dd1cd54622
commit
e2cf8977fd
1 changed files with 8 additions and 3 deletions
|
|
@ -15,9 +15,6 @@
|
|||
|
||||
(label_name) @label
|
||||
|
||||
((identifier) @constant
|
||||
(#eq? @constant "_"))
|
||||
|
||||
(const_spec
|
||||
name: (identifier) @constant)
|
||||
|
||||
|
|
@ -41,6 +38,14 @@
|
|||
(method_spec
|
||||
name: (field_identifier) @method)
|
||||
|
||||
; Constructors
|
||||
|
||||
((call_expression (identifier) @constructor)
|
||||
(#lua-match? @constructor "^[nN]ew.+$"))
|
||||
|
||||
((call_expression (identifier) @constructor)
|
||||
(#lua-match? @constructor "^[mM]ake.+$"))
|
||||
|
||||
; Operators
|
||||
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue