-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
elm-language-server/src/common/providers/codeActionProvider.ts
Lines 113 to 127 in 0f96f57
| if (this.settings.isCodeActionResolveSupported("edit")) { | |
| this.connection.onRequest( | |
| CodeActionResolveRequest.method, | |
| (codeAction: IRefactorCodeAction) => { | |
| if (!codeAction.data.uri) { | |
| return codeAction; | |
| } | |
| return new ElmWorkspaceMatcher((codeAction: IRefactorCodeAction) => | |
| URI.parse(codeAction.data.uri), | |
| ).handleResolve((codeAction, program, sourceFile) => | |
| this.onCodeActionResolve(codeAction, program, sourceFile), | |
| )(codeAction); | |
| }, | |
| ); | |
| } |
In this snippet the callback takes an IRefactorCodeAction; and I believe typescript decides to remove the check on line 117 because IRefactorCodeAction has it defined to be a string. If would probably be better to accept a CodeAction and cast to IRefactorCodeAction as appropriate.
Here is the equivalent part of the js from the installed package:
if (this.settings.isCodeActionResolveSupported("edit")) {
this.connection.onRequest(vscode_languageserver_1.CodeActionResolveRequest.method, new elmWorkspaceMatcher_1.ElmWorkspaceMatcher((codeAction) => vscode_uri_1.URI.parse(codeAction.data.uri)).handleResolve((codeAction, program, sourceFile) => this.onCodeActionResolve(codeAction, program, sourceFile)));
}Currently this seems to cause most of the code actions I try to run to fail when using zed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels