-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SymbolProvider line info gets out of whack when editing the file in Calva #1178
Comments
Related to this is that sticky scrolling in VS Code would get much better if the Outline would have some more depth. Currently it seems to only include top level symbols? |
clojure-lsp bases its documentSymbol data on the file's analysis. But, at the moment it doesn't wait for any currently running analysis to finish before replying to a documentSymbol request. My guess is that Calva sends didChange, which starts an (asynchronous) analysis, and then immediately documentSymbol. The second request uses the analysis that already exists, which, assuming the analysis hasn't finished, is for the prior version of the file. That's why the first edit is off by -1 and undoing is off by +1. In each case, clojure-lsp is providing documentSymbol data for how the file was a moment ago. If I'm right, that's a really quick fix. I'll see if I can reproduce the problem and whether I can fix it. |
Wait for analysis of file before responding to document-symbol. Fixes #1178
Wait for analysis of file before responding to document-symbol. Fixes #1178
Wait for analysis of file before responding to document-symbol. Fixes #1178
Wait for analysis of file before responding to document-symbol. Fixes #1178
Wait for analysis of file before responding to document-symbol. Fixes #1178
Hi I link hereby the relevant sticky scroll issue : microsoft/vscode#157630 |
If I edit the file, adding/removing lines, then the Outline links to the wrong locations of the file.
This gets extra problematic with the new Sticky Scroll feature of VS Code, where the symbol provider is used to inform what should stick while scrolling. Here's an issue where this is clarified by the VS Code team:
To Reproduce
What's a bit extra strange here is that if I undo the change of adding a line, the Outline now links to incorrect line offset by +1.
Expected behavior
The outline should navigate to the new line locations of the symbols is lists as the file is edited.
Log - client <-> server
Log - clojure-lsp
User details (please complete the following information):
clojure-lsp --version
)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: