tliron / glsp

Language Server Protocol SDK for Go
Apache License 2.0
149 stars 21 forks source link

Fix semanticTokens/refresh #15

Closed grouville closed 2 years ago

grouville commented 2 years ago

The MethodTextDocumentSemanticTokensRefresh is not properly labeled and queries an undefined method, as it is a workspace scoped function, not a TextDocument one.

Spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokensWorkspaceClientCapabilities

Fixes an undefined method error. This fix is currently tested and used on a personal language server

Signed-off-by: guillaume

tliron commented 2 years ago

Thanks for this! However, I would ask to also move the code to workspace.go, and also put in the right place and order in handler.go, just to keep the codebase consistent. Is that OK with you?

grouville commented 2 years ago

Thanks for this! However, I would ask to also move the code to workspace.go, and also put in the right place and order in handler.go, just to keep the codebase consistent. Is that OK with you?

You're 100% right, my bad. Rebased and done

tliron commented 2 years ago

Thanks! Final request: your documentation link in the comment is to version 1.17, but we are still explicitly doing 1.16 for now. Could you fix that comment?

grouville commented 2 years ago

Thanks! Final request: your documentation link in the comment is to version 1.17, but we are still explicitly doing 1.16 for now. Could you fix that comment?

Done