-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Feature Request] Support codeAction/resolve #859
Comments
This server relies on typescript (tsserver) API to get the data. Since the only API that it provides is one that returns code actions with all the needed data, it wouldn't make sense to not return that data in the initial Do you see any actual issues with the current approach? I have never thought to myself: "this code action request is slow, I wish it would be faster...". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In newer versions of the LSP spec, clients and servers can support not sending certain fields with
textDocument/codeActions
requests, and instead resolving those fields for a specific code action through a subsequentcodeAction/resolve
request:https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction
This can be beneficial for situations where fields (like the
edit
field in a code action) is computationally expensive to calculate. The language server can defer calculating those fields for the initialtextDocument/codeActions
request that returns many code actions. Then, when a user chooses a code action, the client can make a request just for that code action tocodeAction/resolve
, retrieve theedit
information, and apply the workspace edit. It trades potential additional latency on every singletextDocument/codeActions
request for slightly more latency when executing a single code action.I tried to make a
codeAction/resolve
request to typescript-language-server and found that it was not supported.My request is
codeAction/resolve
resolveSupport
on the client andresolveProvider
from the server)The text was updated successfully, but these errors were encountered: