Skip to content

Commit

Permalink
Send non-encoded doc uri for clojure-lsp refactorings
Browse files Browse the repository at this point in the history
Fix #911
  • Loading branch information
bpringe committed Dec 31, 2020
1 parent 649a535 commit ee0d373
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Changes to Calva.

## [Unreleased]
- Fix: [clojure-lsp refactorings not working on Windows](https://github.com/BetterThanTomorrow/calva/issues/911)
- [Remove default key binding for toggling Calva key bindings](https://github.com/BetterThanTomorrow/calva/issues/815)

## [2.0.140 - 2020-12-28]
Expand Down
13 changes: 7 additions & 6 deletions src/lsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ function createClient(jarPath: string): LanguageClient {
}
},
provideCompletionItem(document, position, context, token, next) {
if (util.getConnectedState()) {
return null;
} else {
return next(document, position, context, token);
}
if (util.getConnectedState()) {
return null;
} else {
return next(document, position, context, token);
}
},
provideSignatureHelp(document, position, context, token, next) {
if (util.getConnectedState()) {
Expand Down Expand Up @@ -161,7 +161,8 @@ function registerLspCommand(client: LanguageClient, command: ClojureLspCommand):
if (document && document.languageId === 'clojure') {
const line = editor.selection.active.line;
const column = editor.selection.active.character;
const params = [document.uri.toString(), line, column];
const docUri = `${document.uri.scheme}://${document.uri.path}`;
const params = [docUri, line, column];
const extraParam = command.extraParamFn ? await command.extraParamFn() : undefined;
if (!command.extraParamFn || command.extraParamFn && extraParam) {
client.sendRequest('workspace/executeCommand', {
Expand Down

0 comments on commit ee0d373

Please sign in to comment.