Skip to content

Commit

Permalink
Merge branch dev into published
Browse files Browse the repository at this point in the history
  • Loading branch information
PEZ committed Jun 6, 2021
2 parents dedfd2c + c714af1 commit 35f1490
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 437 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changes to Calva.

## [Unreleased]

## [2.0.200] - 2021-06-06
- Update clojure-lsp to version `2021.06.01-16.19.44`

## [2.0.199] - 2021-06-04
- [Support custom clojure-lsp path](https://github.com/BetterThanTomorrow/calva/issues/1181)
- [Improve debugger call stack](https://github.com/BetterThanTomorrow/calva/issues/1150)
Expand Down
11 changes: 10 additions & 1 deletion docs/site/clojure-lsp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Calva uses a mix of static and dynamic analysis to power the experience. A lot of the static abilities come from [clojure-lsp](https://github.com/snoe/clojure-lsp). This enables you to check something up in a project, with a lot of navigational and contextual support, without starting a REPL for it. (And once you do start a REPL you'll get even more capabilities, enabled by the dynamic analysis.)

!!! Note
Calva determines the version of clojure-lsp it uses by default. This means it may not be using the latest version of clojure-lsp. You can see what version is being used by running the `Clojure-lsp Server Info` command, which will also show the version of clj-kondo that's being used as well as other info. To use a different version of clojure-lsp, see the [configuration](#configuration) section. **Calva does not use the clojure-lsp installed on your system, unless you [set the path for clojure-lsp](#using-a-custom-clojure-lsp-native-binary) to the installed binary in your settings**.

## Starting the LSP server

You don't need to do anything to start clojure-lsp. No install, no commands, no nothing. Calva downloads the correct binary for your operating system if necessary (this should only happen when the clojure-lsp version is updated in a new release of Calva) and then starts it. It does take a while for clojure-lsp to start, though, especially the first time for a new project, when clojure-lsp (via `clj-kondo`) indexes the project files.
Expand All @@ -28,7 +31,7 @@ For information about how to configure clojure-lsp, see the [settings](https://c

You can change the version of clojure-lsp used by Calva by setting the `calva.clojureLspVersion` property to a version of clojure-lsp found in its GitHub [releases](https://github.com/clojure-lsp/clojure-lsp/releases). This can be helpful if you're debugging an issue with clojure-lsp or you want to try out a feature of a new release that Calva does not yet use. However, you must remember to reset this setting in order for Calva to automatically use newer versions of clojure-lsp that are released with new versions of Calva.

Example value for this setting:
Example:

```json
"calva.clojureLspVersion": "2021.04.07-16.34.10"
Expand All @@ -38,6 +41,12 @@ Example value for this setting:

You can set a path to a clojure-lsp binary to be used by Calva by setting the `calva.clojureLspPath` setting. This should be an absolute path. When this is set, the binary at the path will be used and the `calva.clojureLspVersion` setting will be ignored.

Example:

```json
"calva.clojureLspPath": "/usr/local/bin/clojure-lsp"
```

## Troubleshooting

If something doesn't seem to be working correctly, and you suspect the issue is related to clojure-lsp, a good place to start investigating is the request and response logs between the LSP client and server. In your settings, set `clojure.trace.server` to `verbose`, then in the VS Code output tab, select the `Clojure Language Client` output channel.
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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Calva: Clojure & ClojureScript Interactive Programming",
"description": "Integrated REPL, formatter, Paredit, and more. Powered by cider-nrepl and clojure-lsp.",
"icon": "assets/calva.png",
"version": "2.0.199",
"version": "2.0.200",
"publisher": "betterthantomorrow",
"author": {
"name": "Better Than Tomorrow",
Expand Down Expand Up @@ -278,7 +278,7 @@
},
"calva.clojureLspVersion": {
"type": "string",
"default": "2021.04.23-15.49.47",
"default": "2021.06.01-16.19.44",
"markdownDescription": "The version of `clojure-lsp` to download and use. (Will take effect after a reload of the project window.) Reset this setting to switch it back to the current Calva default."
},
"calva.clojureLspPath": {
Expand Down
Loading

0 comments on commit 35f1490

Please sign in to comment.