-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Debugger decorations are not working properly #1165
Comments
An idea came to me so I'll put it here, though I haven't investigated it yet. The issue could be because of a timing issue with when clojure-lsp updates its database of where references are located, and when we send a request to get the locations. We may be able to fix this by waiting a short time after a document update to send the request for reference locations. It may also help to clear decorations right after a doc update, then render them again when we get the new locations. This way there won't be moments when (or they'll be hopefully too short to notice) the decorations are off between document update and re-render of decorations. I think a flicker off/on of the decorations is better than a moment of a buggy-looking rendering. We may just need to increase the debounce time here: calva/src/debugger/decorations.ts Line 99 in 35f1490
|
By chance I found the issue. It is https://github.com/BetterThanTomorrow/calva/blob/dev/src/debugger/decorations.ts#L48 Changing to get the Uri from |
I don't recall right now if there was a reason to use |
Debugger decorations were working fine before from what I know, after I spent some time on fixes and enhancements in the past. I noticed while working on another debugger feature that they are functioning oddly now. The only thing I know off hand that changed is the version of clojure-lsp, but since the code uses lsp to get references, and I doubt there's a mistake with lsp, I'll have to revisit the code 😞.
Hopefully I can find a more resilient solution.
Repro:
thing
thing
in thecomment
form, notice the decoration there disappears.thing
or remove letters, i.e.things
orthin
and notice weird behavior with the decoration showing up when or where it shouldn't, or not showing up when it shouldSeems likely to be a problem with the timing of the update/render.
The text was updated successfully, but these errors were encountered: