A Language Server for Clojure. Taking a Cursive-like approach of statically analyzing code.
The goal of this project is to bring great editing tools for Clojure to all editors. It aims to work alongside you to help you navigate, identify and fix errors, perform refactors and much more!
You will get:
- Jump to definition
- Find references
- Code actions
- Automatic ns management
- Code lens
- Semantic tokens (syntax highlighting)
- Call hierarchy
For all available features, check the features section.
clojure-lsp are very welcome! You can open an issue or a PR and we'd love to help.
For building the jar manually, run
lein bin to generate the embedded jar inside
target folder or
lein uberjar for building the standalone jar.
Every release the native binaries (Windows, Linux and MacOS) are compiled with GraalVM and uploaded.
To build a native image with GraalVM:
- Install the GraalVM 21.0.0 for Java 11 and set the
GRAALVM_HOMEto the installation dir
$GRAALVM_HOME/bin/gu install native-image
- Run from
The build may take some minutes and the result will be a
./clojure-lsp native binary.
clojure-lsp development, there are 3 possible ways of finding a bug or implementing a new feature:
- Create a test for your bug/feature, then implement the code following the test.
clojure-lspstarts a NREPL server if built with
lein with-profile :debug bin, with that it's possible to change the code of a running instance and see the changes on your client in real time. To get the NREPL port, you can check the
/tmp/clojure-lsp.*.outlog, it will print the NREPL port on server startup or you can get it via
server-infocustom LSP command.
clojure-lspwith your changes and test it manually in your client, this is the slowest option, but it makes sense for final tests.
- For debugging purposes, there is two custom commands
Support the project#
clojure-lsp has more than 8.000 lines of code, to keep all of this working, we need to help the community on a lot of issues and implement new features. As a LSP server, this project is the base for Clojure clients like Emacs(lsp-mode), VSCode(Calva) and vim.
You can help us keep going and improving it by supporting the project
Special thanks to Eccentric-J for the