-
-
Notifications
You must be signed in to change notification settings - Fork 160
Linked edit fixes #1947
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
Linked edit fixes #1947
Conversation
Unfortunately, yes
I think the problem is the analysis we lost when we change the buffer, when we edit anything, clojure-lsp sends to clj-kondo the whole text to get new analysis, changing its internal db (atom), I believe there is some issue while the analysis was not saved to the db, but that usually means the request are in some weird order |
That makes sense: I can see that |
@ericdallo I've pushed changes which should fix the integration tests. In the process, I discovered that |
@paulbutcher I think I have the fix for this, we need to wrap in handlers.clj the linkedEdit call with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
* Restrict linked edits to namespace aliases only * Use alias-range instead of ->range * Remove debugging erroneously left in * Fix integration tests * Fix lint * Update changelog
docs
folder)Fixes #1943
This is a work in progress: it makes things better than they currently are, but definitely still isn't a complete solution.
This PR:
nil
instead of an error when there are no applicable linked edits.However it still doesn't work entirely reliably (the timing-related issue described here is still evident). I'm also not really happy with the fact that I've had to cobble together
alias-range
instead of using->range
(as far as I can see there's no other way to dig the alias portion out of a symbol?).I'll see if I can work out what's going on with the timing issue, but I'm still very unsure whether the relatively little value added by linked edits for Clojure is worth the trouble? 🤷