Skip to content

x/tools/gopls: Make sure popular lsp clients are setting semantic token client capabilities #80736

Description

@aputman

Since issue #80309 was fixed, once users start using gopls v0.24.0, the client they use will need to correctly send the following client capabilities:
textDocument.semanticTokens.tokenTypes
textDocument.semanticTokens.tokenModifiers

As mentioned in #80309, the LSP expects that clients set these fields if they support semantic tokens, as it the two capabilities denote the maximal set of token/modifier types the server should return to the client. Since other language servers probably do enforce this client capability, I don't expect this to be an issue.

But since gopls didn't previously, its possible that some clients didn't think it was necessary. So this issue is just to make sure we preemptively go through popular client's capabilities to prevent any regressions.

Popular clients:

  • vscode : todo
  • neovim : capabilities here
  • Zed : capabilities here, token/mod types here
  • Cursor : Uses vscode extensions, so vscode-go would provide the LSP client capabilities (or route them)
  • Helix : todo
  • Emacs (eglot) : todo

Metadata

Metadata

Labels

ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions