There are several ways of finding and fixing a bug or implementing a new feature:
clojure-lsp
using make
each time you have made changes, and test it manually in your client. This is the slowest option.Whichever development path you choose: For final testing, it is good to rebuild the binary with make
.
There are two custom LSP methods clojure/serverInfo/log
and clojure/cursorInfo/log
. They can assist in debugging.
With a clojure-lsp + nREPL powered Clojure editor you can modify your editor session's clojure-lsp server using the Clojure REPL.
Here's demo video: https://www.youtube.com/watch?v=4UvT0yqBDw8
These are the steps:
clojure-lsp
executable from this projectmake
- to build the clojure-lsp executableserverInfo
commandport
entry in the outputSeeing is believing. An easy way to convince yourself that you can actually change clojure-lsp mid-flight is to:
server-info
function in src/clojure_lsp/handlers.clj
:foo :bar
entry to the map returnedserver-info
function definitionserverInfo
command:foo :bar
in the outputYou have just modified the LSP server powering your editor while it was running! This is the Clojure way. No recompiling and restarting and reloading. That is some other, non-Clojure, way.
The details in how to perform these steps can vary a bit between the various Clojure editors/plugins.
clojure-lsp
executable built in step 2 above. You can skip step 1.TBD. PR welcome.
TBD. PR welcome.
Can you improve this documentation? These fine people already did:
Eric Dallo & Peter StrömbergEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close