-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix how semantic tokens server capabilities are computed (#213)
* Fix server capabilities for semantic tokens. A server can support up to three separate semantic tokens requests. Rather than have `@server.feature()` methods provide the full `SemanticTokensOptions` definition, this commit adjusts the `LSP_METHODS_MAP` to accept just the `SemanticTokensLengend`. Then in the `ServerCapabilitiesBuilder`, the `full` and `range` fields of `SemanticTokensOptions` are computed according to which features are present. Since `SemanticTokensOptions` only supports a single legend, if multiple legends are found, only the first one will be used. * Add semantic tokens example This updates the example `json-extension` to include an example `textDocument/semanticTokens/full` implementation that highlights all keys in a JSON document. * Update changelog Co-authored-by: Daniel Elero <[email protected]>
- Loading branch information
Showing
6 changed files
with
355 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.