Skip to content

Commit

Permalink
[language-go] Highlight method names like function names
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Jan 19, 2024
1 parent 3864c0d commit f171f33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/language-go/grammars/tree-sitter-go/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@
] @keyword.control._TYPE_.go


; Function names: the "foo" in `func foo() {`
(function_declaration (identifier) @entity.name.function.go)
; Method names: the "Foo" in `func (x Bar) Foo {`
(method_declaration (field_identifier) @entity.name.function.method.go)

(call_expression
(identifier) @support.function.builtin.go
Expand Down

0 comments on commit f171f33

Please sign in to comment.