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: fix highlighting of brackets, variables, fields (#7276)

Thorsten Ball79c1003b344e
diff --git a/crates/zed/src/languages/go/highlights.scm b/crates/zed/src/languages/go/highlights.scm
index 6a9be8aae07..8cbf976fb8d 100644
--- a/crates/zed/src/languages/go/highlights.scm
+++ b/crates/zed/src/languages/go/highlights.scm
@@ -1,6 +1,10 @@
-(identifier) @variable
(type_identifier) @type
-(field_identifier) @property
+(field_identifier) @variable.member
+
+(keyed_element
+ .
+ (literal_element
+ (identifier) @variable.member))
(call_expression
function: (identifier) @function)
@@ -15,6 +19,15 @@
(method_declaration
name: (field_identifier) @function.method)
+[
+ "("
+ ")"
+ "{"
+ "}"
+ "["
+ "]"
+] @punctuation.bracket
+
[
"--"
"-"