tree-sitter / tree-sitter-go

Go grammar for tree-sitter
MIT License
310 stars 65 forks source link

"any" type highlight #83

Closed vcraescu closed 1 year ago

vcraescu commented 2 years ago

I don't know if there is a problem with Neovim or with the tree-sitter but apparently, the any type is incorrectly highlighted.

image

In TSPlayground it looks like the TSTypeBuiltin highlight is applied but for some reason, TSType highlight is used.

image
fioncat commented 2 years ago

I think any and comparable should be highlighted, they are new predeclared identifiers since go1.18, release note:

The new predeclared identifier any is an alias for the empty interface. It may be used instead of interface{}. The new predeclared identifier comparable is an interface that denotes the set of all types which can be compared using == or !=. It may only be used as (or embedded in) a type constraint.

vcraescu commented 2 years ago

yeah