Fork me on GitHub
#calva
<
2022-05-14
>
pinkfrog03:05:54

Yes it possible to restart clojure-lsp with a keyshort cut. Currently the way is to stop and start is still a bit clumsy.

bringe03:05:13

Not currently, but I created an issue for it: https://github.com/BetterThanTomorrow/calva/issues/1727. It should be pretty easy to implement.

bringe03:05:01

I bet this could be done with #joyride too 😄 (CC @U0ETXRFEW). Though, it’s probably wise, and easy, to add to Calva as a command.

pez06:05:59

I agree it fits in Calva. However, @U9A1RLFNV’s hunch it can be dome with #joyride is correct. 😃 This keyboard shortcut does it.

{
        "key": "cmd+f4",
        "command": "joyride.runCode",
        "args": "(require '[promesa.core :as p]) (p/do (vscode/commands.executeCommand \"calva.clojureLsp.stop\") (vscode/commands.executeCommand \"calva.clojureLsp.start\"))"
    },
I would probably define a function for it in some my-commands namespace during Joyrirde activate and call that function instead, to keep the shortcut simpler, and also have a natural place to get the code right using the REPL. Will add an example recipe for this to Joyride, I think.

🎉 1