Skip to content

Commit

Permalink
Send LSP command request for resolved code actions
Browse files Browse the repository at this point in the history
Fix #1373. Update changelog.
  • Loading branch information
bpringe committed Nov 29, 2021
1 parent 0eb8396 commit 60241a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changes to Calva.
- Internal: [Handle the unknown-op status from test commands](https://github.com/BetterThanTomorrow/calva/pull/1365)
- Fix: [textDocument/linkedEditingRange failed when opening files or moving cursor](https://github.com/BetterThanTomorrow/calva/issues/1374)
- Fix: [paredit.spliceSexp doesn't work with set literals](https://github.com/BetterThanTomorrow/calva/issues/1395)
- Fix: [LSP code actions not working](https://github.com/BetterThanTomorrow/calva/issues/1373)

## [2.0.225] - 2021-11-10
- Revert 224 changes: [Version v2.0.224 causes problems on some machines (possibly Windows related)](https://github.com/BetterThanTomorrow/calva/issues/1379)
Expand Down
8 changes: 4 additions & 4 deletions src/lsp/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function createClient(clojureLspPath: string): LanguageClient {
provideLinkedEditingRange: async (_document, _position, _token, _next): Promise<vscode.LinkedEditingRanges> => {
return null;
},
resolveCodeAction(item, token, next): ProviderResult<CodeAction> {
console.log(item);
// TODO: See if next returns codeAction/resolve response and then use info from that to call lsp command
return next(item, token);
async resolveCodeAction(item, token, next): Promise<CodeAction> {
const { command } = await next(item, token);
sendCommandRequest(command.command, command.arguments);
return null;
},
handleDiagnostics(uri, diagnostics, next) {
if (uri.path.endsWith(config.REPL_FILE_EXT)) {
Expand Down

0 comments on commit 60241a9

Please sign in to comment.