-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/golang: customize semantic token types and modifiers
We agreed to return full set of token types and modifiers from gopls by default (full means token types and modifiers that gopls understand) and provide configuraton options for users to disable some of them. - Two fields of type map[string]bool are introduced to gopls UIOptions (workspace/configuration) to customize semantic token types and modifiers. For now, only value of "false" is effective. Choose type of map over array to keep future compatibility in case we want to introduce enable capabilities. - VSCode-Go populate these options from user settings to gopls. - Gopls "initialize" protocol returns a pre-defined fixed legend including subset of standard legend defined LSP that gopls understand with additional customize modifiers gopls recoganized. - Gopls "textDocument/semanticTokens" protocol returns token types and modifiers based on configuration defined in workspace/configuration. Tested with vscode-go changes CL 642416, screenshot is at golang/vscode-go#3632 (comment) For golang/vscode-go#3632 Change-Id: Ie8220e12a4c8d6c84c54992d84277767e61ec023 Reviewed-on: https://go-review.googlesource.com/c/tools/+/642077 Auto-Submit: Hongxiang Jiang <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information
Showing
13 changed files
with
313 additions
and
171 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.