-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
#75342 made me think that I so often catch shadow bugs early, because i have the shadow analyzer enabled, that it would be nice to have some better way to expose such functionality to users, such that these are not warnings, but as a hint.
This is not only about variable naming bugs, but I often get frustrated that url. does not give any autocomplete only to realize that I have declared an url variable.
It would be nice to have a way to give attention to some parts of code.
My proposition is we add a shadowing semantic token modifier, that is returned to the editor, when an identifier causes other identifier, from outer scope(s), to be shadowed.
Example:
It requires (at least in nvim) some special configuration:
vim.api.nvim_set_hl(0, '@lsp.mod.shadowing', { bold=true, underline=true })CC @adonovan
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.