Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

go: split definition and call highlights for functions, methods, and types (#49120)

Tomas Virgl712914a1f771
diff --git a/crates/languages/src/go/highlights.scm b/crates/languages/src/go/highlights.scm
index e861625ecc7..15a512d6b7e 100644
--- a/crates/languages/src/go/highlights.scm
+++ b/crates/languages/src/go/highlights.scm
@@ -1,6 +1,9 @@
(identifier) @variable
(type_identifier) @type
+(type_spec
+ name: (type_identifier) @type.definition)
+
(field_identifier) @property
(package_identifier) @namespace
@@ -12,11 +15,11 @@
(identifier) @property))
(call_expression
- function: (identifier) @function)
+ function: (identifier) @function.call)
(call_expression
function: (selector_expression
- field: (field_identifier) @function.method))
+ field: (field_identifier) @function.method.call))
(function_declaration
name: (identifier) @function)