Calva Gets Static Analysis Features via Clojure-lsp

Exciting future for Calva ahead, congratulations.

EDIT: Be aware that clojure-lsp currently consumes additional memory whist the clojure-lsp process runs, although this should only be for less than a minute (usually much less). The greater number of dependencies a project has, the more memory seems to be consumed and time taken. I have had several projects with a large number of dependencies that consume over 3Gb of RAM when clojure-lsp is run by Calva, but hopefully these are the exceptions.

There is currently no way to prevent clojure-lsp running in Calva (except downgrading to version 2.0.136 where it is not used). It is very welcome to see many people involved in efforts to reduce the memory footprint and other improvements to the experience.

Another potential issue to be aware of is multiple instances. If VS Code is restarted (i.e. when a new version of calva is available) whist clojure-lsp is running, it may not terminate that process. Check your system monitor for java processes using larger amouts of memory if you have issues.

The clojure-lsp process does run in a background thread, so if your computer has more than 2Gb of free RAM it should not affect performance at all (or you can step away from your computer and get a cup of tea).

Clojure-lsp does give the opportunity for editing functionality (not REPL functionality) to be common across all Clojure editors and I hope that clojure-lsp continues to evolve to be a common tool for Clojure development. It does seem that with Calva’s move to LSP there are more visible signs of activity around this interesting project

Thank you to all involved.

1 Like