-
Notifications
You must be signed in to change notification settings - Fork 133
Extension breaks highlight selected word occurences on scrollbar #2005
Comments
Looks like the analysis in Language server might be blocking the highlighting. |
Might be side effect of #1767 |
Is the issue here that it's slow, or that it's not working at all? I can understand slow, given this now uses the analysis. |
It's not working at all. |
I guess I'm confused; the screencast shows it working for variables. Are you specifically referring to keywords? Those aren't expected to to work, and only worked before as it was VS Code "guessing" what to highlight without understanding the context. |
If that's it, then we can see if the call is returning empty or none; if it's empty than maybe returning a |
I can film new screencast with restart of vscode after plugin enabled. And nothing will work. I guess it is something like an artifact from working time before. |
Note that the lower screencast is just VS Code's builtin matching which doesn't care about context at all and will highlight any matching word. We declare that we support the feature, so it disables itself. In the first screencast:
But none of these are it "not working". |
So, how can I bring back primitive builtin matching and have benefits from extension: autocomplete, linting, go to definition, etc.? |
I don't think there's any simple way that's not a code change in the extension or the LS. Feasibly you can disable the extension's LS downloader and manually use an old build, but that is a pretty significant workaround. To confirm, it's the keywords not being highlighted which is the main issue? |
No, the main issue that is nothing highlighted. Take a look at screencasts: |
Your example of |
I got your point, no need to explain each case exactly. My point is I want behavior as it was before (builtin mode) and I want all other features of extension. Is it possible to make some toggle in options to disable extension highlight rules? |
Not in the language server itself. We can only declare at startup that we do or don't support this feature, we cannot do so dynamically. Any other changes would be a hack in the client (the VS Code extension) to skip certain calls, which is a bad idea. It's better to improve the feature than to add toggles to disable it. |
Hm, I didn't see it in the spec initially, but there is way to dynamically declare support for this. Regardless, we should try and address the issues first, rather than adding toggles we don't plan to keep. |
This will need #1960 since it handles stub references better. It does not seem to be possible to return null or something to get default behavior, so for non-references we'd need to get down to tokens. |
Environment data
vscode
Version: 1.44.2
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T17:50:03.709Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-96-generic
Extension version: 2020.4.74986
OS and version: ubuntu 18.04
Steps to reproduce:
Enable extension, some clicks and scrolls and thing stop working. Disable extension and highlight works just fine.
More info and discussion about reasons is here microsoft/vscode#16042
Looks like many years ago some other lang extensions did have problems with this.
More to say, if I open, lets say a
.yml
file, then scrollbar highlight works just fine, even when python extension enabled.The text was updated successfully, but these errors were encountered: