mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 01:40: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
|
(label_name) @label
|
||||||
|
|
||||||
((identifier) @constant
|
|
||||||
(#eq? @constant "_"))
|
|
||||||
|
|
||||||
(const_spec
|
(const_spec
|
||||||
name: (identifier) @constant)
|
name: (identifier) @constant)
|
||||||
|
|
||||||
|
|
@ -41,6 +38,14 @@
|
||||||
(method_spec
|
(method_spec
|
||||||
name: (field_identifier) @method)
|
name: (field_identifier) @method)
|
||||||
|
|
||||||
|
; Constructors
|
||||||
|
|
||||||
|
((call_expression (identifier) @constructor)
|
||||||
|
(#lua-match? @constructor "^[nN]ew.+$"))
|
||||||
|
|
||||||
|
((call_expression (identifier) @constructor)
|
||||||
|
(#lua-match? @constructor "^[mM]ake.+$"))
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue