calva

pez 2025-04-10T07:36:50.569109Z

TIL: There’s a crucial difference with starting a deps.edn powered shadow-cljs REPL via the shadow-cljs CLI tool and starting it via the clojure CLI tool. When shadow-cljs is used to start the REPL, the Clojure REPL available in Calva will be a separate process from the Clojure REPL powering the ClojureScript REPL. While when clojure is used and it uses the shadow-cljs API to start the ClojureScript REPL, the two REPLs will be running in the same process. Well, actually I knew this, but today I put 2 and 2 together and understood more of the implications. I have been defaulting to use npx shadow-cljs … to start the REPL (this is what Jack-in using the shadow-cljs project type does). I have also been dissapointed every time i have tried to bring in a new dependency dynamically via Clojure 1.12 add-libs. And I have somewhat idiotically concluded that this is not available for ClojureScript REPLs. Until today when I thought a bit about it and realized that the solution is to start the REPL using clojure (in my case that means jacking in using the deps.edn + shadow-cljs project type). Now add-libs works perfectly also for ClojureScript. I will think a bit more about this and then update the Calva docs, highlighting this difference, and probably be recommending to avoid the shadow-cljs project type unless you are using shadow-cljs for dependencies and classpath.

🎉 4
pez 2025-04-10T16:04:46.379729Z

Check out the modifiers docs: https://calva.io/custom-commands/#interpolationsubstitution-modifiers

2025-04-10T17:44:23.301859Z

Hi @pez and dear Calva users. I'm a kovisoft/paredit widow from vim. I needed to use Cursor (vscode) on windows and with the awesome Calva plugin. Apparently if I use vscode-neovim extension that delegates the vscode buffer for a actual neovim instance I'm able to load kovisoft/paredit plugin on init.lua and have a similar experience that I have on neovim (at least regarding to this plugin). Calva has it's own Paredit implementation and configuration.. I imagine that It's best to configure Calva > Paredit: Default Key Map none instead of strict What do you think ? Which one are going to interfere less with neovim's paredit ?

pez 2025-04-10T19:06:50.277129Z

It depends on what keybindings are used for NeoVims Paredit. The difference between Strict and CaveMan is how backspace and alt+backspace are mapped. With the Strict, backspace doesn’t delete balanced parens unless it is an empty pair, and alt+backspace deletes as VS Code would delete things. With CaveMan the mappings are reversed. I have a guess that CaveMan will work fine. Giving you access to both Paredit systems. But if NeoVim Paredit binds similar keys it may conflict and then possibly None is better. You can check the default bindings here: https://calva.io/paredit/

2025-04-10T19:27:35.567639Z

Does the no default key binding disables paredit ?

pez 2025-04-10T20:07:09.363999Z

No. Paredit is on-demand via commands. Can’t be disabled, but also doesn’t need to be disabled, since you can just choose not to use it.