kludge up for Eglot's use of codeAction/resolve#2
Conversation
|
Thanks, I've finally had some time to look into this. You are right - servers requiring
The reason is this: by first calling At this point, you don't really need the source code modifications for all the items - just the action names that are shown in the menu. When the user clicks say Without
Right. The trouble with your approach (apart from some other minor things I noticed in your patch) is that it will only work with one server supporting This is surely doable, I might have a look at it myself in the future. |
|
to be honest this PR should be deservedly considered total abandonware, in fact I should have closed it right at the moment of adopting https://github.com/rassumfrassum but forgot. sorry!
that definitely made some things click. thanks for taking the time, much appreciated! |
|
Out of curiosity, what is this? It points me to some user profile. |
|
because I also can't type for some reason, here's the correct link: https://github.com/joaotavora/rassumfrassum |
|
Ah, nice, good to know there's an alternative. |
This is obviously a hack but it works for my use case, which is the usual "need to use (based)Pyright & Ruff with Eglot".
Prior to this change, Ruff's code actions (at least visible ones, like organizing imports) did not work with Eglot because Eglot invokes such actions through
codeAction/resolveonly and since Ruff is normally not the promary LSP server its declaration of support forcodeAction/resolvewas not propagated by the proxy.My main problem with all this is that I have no idea why
codeAction/resolveeven exists or what exactly it's supposed to do (and I am furthermore unable to understand the relevant part of the spec), so the approach here, while fixing my immediate problem, is most likely wrong in general.And it probably would be inadequate in case of several proxied servers with resolve support.
But posting in case anyone finds this useful.