go: fix highlighting of brackets, variables, fields (#7276)
This changes the highlighting of Go code to make it more similar to how we highlight Rust * normal variables have the normal color, vs. being highlighted. This really stuck out. * brackets are properly highlighted It also brings it closer to Neovim's tree-sitter highlighting by changing how struct fields are highlighted. Release Notes: - Improved highlighting of Go code by tuning highlighting of variables, brackets, and struct fields. ## Before & After 
This commit is contained in:
parent
d576cda789
commit
79c1003b34
1 changed files with 15 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
||||||
(identifier) @variable
|
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
(field_identifier) @property
|
(field_identifier) @variable.member
|
||||||
|
|
||||||
|
(keyed_element
|
||||||
|
.
|
||||||
|
(literal_element
|
||||||
|
(identifier) @variable.member))
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: (identifier) @function)
|
function: (identifier) @function)
|
||||||
|
@ -15,6 +19,15 @@
|
||||||
(method_declaration
|
(method_declaration
|
||||||
name: (field_identifier) @function.method)
|
name: (field_identifier) @function.method)
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
[
|
[
|
||||||
"--"
|
"--"
|
||||||
"-"
|
"-"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue