This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-06-06
Channels
- # announcements (1)
- # babashka (40)
- # beginners (33)
- # calva (4)
- # cljfx (1)
- # clojure (63)
- # clojure-europe (25)
- # clojure-nl (2)
- # clojure-norway (73)
- # clojure-sweden (20)
- # clojure-uk (5)
- # clojurescript (10)
- # datahike (10)
- # events (1)
- # fulcro (17)
- # graalvm (62)
- # hyperfiddle (12)
- # other-languages (19)
- # practicalli (8)
- # reagent (1)
- # releases (1)
- # squint (14)
- # yamlscript (2)
How can I configure Calva to perform all of the following on my command: 1. Start REPL + LSP: jack-in into a REPL for a predefined workspace project and using a predefined connection sequence for this project. Start LSP Server for the same project. 2. Stop REPL + LSP: stop both of these for the predefined workspace project.
I’m afk so can’t check. One approach hinges on that you can provide the project root to the start/stop lsp-server commands. If the commands do not expose this argument, I think it should be easy to make them do that. Another approach is to make Workspace with the particular project folder as the root/first folder. Then string together the commands with runCommands and configure the connection sequence be with the root for auto-select.
Thanks! I have two workspaces and one of them has more than one root and another has a clojure project one level below the root. I want to keep it flexible and be able to configure default configuration in the workspace once and then use it multiple times. I’ve looked into the direction of creating my own extension but I believe we can make it simpler. Something like using an built-in or extension-provided function that allows to execute a few vscode commands in one go and have calva command options either specified when executing the commands (if possible) or configured in the workspace settings.
> Something like using an built-in or extension-provided function that allows to execute a few vscode commands in one go
I think this is runCommands
, see: https://blog.agical.se/en/posts/vs-code-runcommands-for-multi-commands-keyboard-shortcuts/
> have calva command options either specified when executing the commands
I now checked. Both calva.clojureLsp.start
and calva.clojureLsp.stop
accept an URI string argument where you can specify the project root for the server.