Skip to content

x/tools/gopls: For Semantic Tokens, respect client capabilities when returning tokens and mods #80309

Description

@aputman

The LSP client capabilities for Semantic Tokens allows the client to specify the maximum set of token types and modifiers that they support (tokenTypes and tokenModifiers). gopls separately then allows for users to specify their own subsets of those two lists that they want to further filter on with UI settings: gopls.semanticTokenTypes and gopls.semanticTokenModifiers.

Currently gopls only uses the gopls UI settings to restrict which token types and modifiers are returned from the server, not the client capabilities. Instead, we should use the client capabilties as the initial set of accepted types and modifiers. And use the UI settings maps to only further restrict those sets, not add to it.

Metadata

Metadata

Assignees

Labels

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

Type

Fields

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions