Skip to content

Commit

Permalink
Merge pull request #1433 from BetterThanTomorrow/fix_hover_broken_whe…
Browse files Browse the repository at this point in the history
…n_cljs_repl_connected_but_no_runtime_exists

Use clojure-lsp for hover when provideHover throws exception
  • Loading branch information
bpringe committed Dec 12, 2021
2 parents 6fbcb65 + aed17e7 commit b8f9e03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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: [Hover broken when repl is connected but cider-nrelp is not present](https://github.com/BetterThanTomorrow/calva/issues/1432)

## [2.0.229] - 2021-12-12
- Fix: [Babashka Jack-In REPL doesn't show eval errors](https://github.com/BetterThanTomorrow/calva/issues/1413)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/lsp/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ function createClient(clojureLspPath: string): LanguageClient {
return null;
},
async provideHover(document, position, token, next) {
const hover: vscode.Hover = await provideHover(document, position);
let hover: vscode.Hover;
try {
hover = await provideHover(document, position);
} catch (e) {}

if (hover) {
return null;
} else {
Expand Down

0 comments on commit b8f9e03

Please sign in to comment.