Hey folks! Is there a way to have multiple "autoSelectForConnect": true items in calva.replConnectSequences for different projectRootPaths in a monorepo? Here’s a workflow I’d like to achieve:
• User goes into projects/a/src/core.clj, connects to REPL session 1, Calva automatically selects the sequence for projects/a
• User goes into projects/b/src/core.clj, connects to REPL session 2, Calva automatically selects the sequence for projects/b
• Would be also magical if Calva auto switched between REPL sessions 1 and 2 depending which is a file from projects/a or projects/b is currently in focus
(I’ve edited my previous question a bit)
I don’t think you can do that kind of auto-connect with the current configuration. The projectRootPath has almost the opposite purpose. 😃 But I think it makes perfect sense, and in case there are several autoSelectForConnect I think Calva could choose the closest project root, rather than the first connect sequence in the config without disrupting existing configs too much. Issue welcome!
As for the auto-switching. That’s a different beast. I think #joyride could be used to achieve it. But if we get the auto-select thing fixed, the gain may be quite small, since you would only save a ctrl+alt+c ctrl+alt+c keystroke for connecting.
Yes, auto switching is a nice bonus, but not necessary for sure
The double ctrl+alt+c in the file of a current project would be more than enough 🙏
Issues for both would be nice. I think the auto-switch may be somewhat of a compensation for Calva’s one-repl-per-vscode-window limitation.
I’ve added the following https://github.com/BetterThanTomorrow/calva/issues/2753
I have a WIP version of Calva with this implemented now. Pick the VSIX up here: https://app.circleci.com/pipelines/github/BetterThanTomorrow/calva/8546/workflows/b2fcddaf-c872-4b14-a68f-6eff6763d355/jobs/47396/artifacts Would be nice if more people gave it a spin too to get a bit more coverage on different project setups.