x/tools/gopls: add syntax highlighting for go: directives #63538
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Spin off from https://go.dev/issue/50262: we should add semantic token support for go:directives, so that they stand out as semantically significant. That issue was discussing go:embed support, but if we are going to highlight
go:embed
, we should highlight other go directives as well.It probably suffices to add logic here:
https://cs.opensource.google/go/x/tools/+/master:gopls/internal/lsp/semantic.go;l=418;drc=fb4bd11ef6feea8f26ff371d1fcca356511e2e26
We already look inside basic lits of importSpecs to highlight package names, I expect this task would be similar:
https://cs.opensource.google/go/x/tools/+/master:gopls/internal/lsp/semantic.go;l=901;drc=fb4bd11ef6feea8f26ff371d1fcca356511e2e26
@vikblom indicated interest in taking this on.
CC @pjweinb
The text was updated successfully, but these errors were encountered: