go/internal/lsp/testdata/semantic
Chitoku e7de6523a2 internal/lsp: produce "method" in place of "member" as per the spec
As per the current specification, the correct token name that represents methods is `method`. The current implementation does not produce the correct set of result and results in methods being incorrectly highlighted. Furthermore, the parameter names of interface methods are treated as `method` which is not true, so a fix has been applied to handle `ast.FuncType` being `parameter`.

Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#textDocument_semanticTokens

Change-Id: Id5d2fafe9f948a4a175ae19b4c94cca8f48a4b79
GitHub-Last-Rev: 9a3b65ca4dd3bb0542969c043a2042001c7fcb63
GitHub-Pull-Request: golang/tools#340
Reviewed-on: https://go-review.googlesource.com/c/tools/+/349449
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
2021-09-13 21:01:54 +00:00
..
README.md internal/lsp: in semantic tokens, better distinguish between types and variables 2021-05-11 14:51:35 +00:00
a.go internal/lsp/semantic: improve semantic token processing 2021-07-14 22:42:09 +00:00
a.go.golden internal/lsp: produce "method" in place of "member" as per the spec 2021-09-13 21:01:54 +00:00
b.go internal/lsp: in semantic tokens, better distinguish between types and variables 2021-05-11 14:51:35 +00:00
b.go.golden internal/lsp: produce "method" in place of "member" as per the spec 2021-09-13 21:01:54 +00:00
semantic_test.go internal/lsp: add gopls semtok command and semantic token tests 2020-10-16 18:10:36 +00:00

README.md

The golden files are the output of gopls semtok <src-file>, with -- semantic -- inserted as the first line (the spaces are mandatory) and an extra newline at the end.