-
Notifications
You must be signed in to change notification settings - Fork 645
Highlighted occurrences do not show in scroll bar when gopls is enabled #2664
Comments
This is interesting... I see this too, but as far as I know this feature is language agnostic and VS Code shouldn't be caring about whether a language server is being used or not to provide this feature... @rebornix Any idea why this might be happening or how a language server can possibly interfere with this feature? |
I'm wondering whether it's because of |
@rebornix Thanks! I can confirm that the language server does register a document highlight provider. So it looks like VS Code highlights all occurrences of the word by default unless a document highlight provider is registered. As per https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight, a document highlight provider is very similar to reference provider, which explains why the results from the language server is a much smaller subset than the textual occurrences. @rebornix So am guessing this is an expected behavior? |
@ramya-rao-a yup, it's as expected. |
Thanks @rebornix Closing this issue as this is the expected behavior |
@ramya-rao-a Can this be kept open until there is feature parity in this regard with and without the language server? Not being able to skim highlighted occurrences in the scroll bar is a big usability regression for me. I can't imagine I'm the only one. |
@blocknonip: What is your preferred outcome for the resolution of this issue? Is it helpful to you for |
@stamblerre: I would like it to work in the same fashion that it does without Basically, I am accustomed to it working in the current way without |
In this case, I think perhaps VSCode-Go could consider adding a configuration to disable highlighting via |
@stamblerre Yes that is a sensible solution. PRs are welcome to update Code Pointers:
|
Please try the latest beta version of this extension has the fix for this You can use the |
Latest stable vscode-go on macOS Mojave.
When
gopls
is enabled, highlighted words no longer show in the scroll bar. This happens regardless ofeditor.occurrencesHighlight
setting (which I prefer false, but tested in both configurations).This does not affect other non-Go file formats, like
settings.json
.No language server:
Gopls:
Thanks.
The text was updated successfully, but these errors were encountered: