Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Thorsten Ball
adb20e6f73 go: highlight identifiers in parameter lists
Forgot this in #7276. This fixes highlighting of parameters, bringing it
also closer to how we highlight `self` in Rust.
2024-02-02 11:52:19 +01:00
Thorsten Ball
43eb148dcf go: fix highlighting of brackets, variables, fields
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.
2024-02-02 11:39:41 +01:00

View file

@ -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,18 @@
(method_declaration
name: (field_identifier) @function.method)
(parameter_declaration
(identifier) @variable.parameter)
[
"("
")"
"{"
"}"
"["
"]"
] @punctuation.bracket
[
"--"
"-"