diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-05-01 00:20:51 -0400 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-05-02 07:52:45 -0400 |
| commit | e2cf8977fda35ad666d7b431b0254d8da710968a (patch) | |
| tree | 803247bcb47f873c68ae74c13a54aff5035447db /queries/go | |
| parent | Update parsers: lua (#4746) (diff) | |
| download | nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.tar nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.tar.gz nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.tar.bz2 nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.tar.lz nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.tar.xz nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.tar.zst nvim-treesitter-e2cf8977fda35ad666d7b431b0254d8da710968a.zip | |
feat(go): highlight constructors, remove _ as `@constant`
Diffstat (limited to 'queries/go')
| -rw-r--r-- | queries/go/highlights.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/queries/go/highlights.scm b/queries/go/highlights.scm index ce4ae89b6..f2bdf6a83 100644 --- a/queries/go/highlights.scm +++ b/queries/go/highlights.scm @@ -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 [ |
