This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # babashka (12)
- # beginners (15)
- # biff (2)
- # calva (17)
- # clj-kondo (19)
- # clj-on-windows (3)
- # clj-otel (1)
- # clojure (3)
- # clojure-europe (5)
- # conjure (2)
- # graalvm (2)
- # helix (5)
- # introduce-yourself (1)
- # nbb (24)
- # off-topic (32)
- # polylith (3)
- # reitit (21)
- # releases (1)
- # reveal (3)
- # scittle (1)
- # squint (56)
- # tools-deps (4)
- # xtdb (6)
I'm new to clojure and lisps. I don't feel like I am effectively using Calva for navigating and editing code. I've reviewed the shortcuts but I still end up using mouse to click where I want to edit and sometimes I feel like I'm fighting Calva. I know I just dont have the workflow right yet. Anyone have any tutorials on how they primarily use Calva to speed up code editing?
I have read through it, and practiced the shortcuts. Maybe I just need more practice but I felt like no matter what shortcut I tried I couldn't get the cursor to navigate where I wanted without resorting to just using mouse or bare arrow keys
ctrl+down let you navigate out / in of expressions;
ctrl+right let you navigate left/right between expressions -- so a lot of the efficiency comes from thinking in forms rather than text...
Thanks I'll try focusing on those. Sometimes I find myself getting stuck in a leaf expression, I'll try alternating up/down vs left/right next time
I've switched editors a lot over the decade-plus I've been doing Clojure and it really does take time to get used to new key bindings.
I'm lucky that I do Clojure for a living so I get to use Calva/paredit eight hours a day 🙂
TBH I haven't used these paredit navigations ever. I mouse and keyboard (although I use a vim emulation that makes a few things easier).
Indeed. Don't let the structural navigation stress you and feel you are doing something wrong. Picking one or two (the ones @U04V70XH6 mentioned are good choices) is a good idea. Once those feel comfortable, add one more. I'd also like to mention Grow Selection. On mac it is a convenient
ctrl+w. I sometimes use it to navigate, since once you have a selection,
left/right will move the cursors to the edges of that selection.
I have two monitors. At first, I was very happy when I found that I could open a new VS window (using
O (the letter O - not zero) and have
output.calva-repl in that window...
Until I found that it doesn't auto scroll to the bottom on evaluations 😢
Can I do anything to get the same behavior (auto scroll) in the new window as in the "primary" window?
Yes, there is an extension named AutoScroll exactly doing this. I run fulcro backend and frontend in one project folder but two different workspace in two vscode window (because calva only supports one repl connect in one window), and then open the repl output in the third window. This setup is superb when developing fullstack app, I am used to working in Intellij Idea Cursive, although it supports connect more than two repl, but easily send code into wrong repl and results manually switch the active repl, this is distraction.
I run backend and frontend in the same VS Code window. With Calva code mostly go to the right REPL. Only with cljc files it gets to be an issue, but it's easy to direct to the right REPL and most often I work with either the backend or frontend part of a cljc file anyway.
I tried @UKN74DPB9's suggestion. Do you have a way to make sure the repl window that autoscrolls does so immediately when the REPL prints new things? In my case the autoscroll only triggers if I click on the window to e.g. let it know I'm here, please resume watching your file! Might be due to all the layers I use: WSL + a dev container...
@U0ETXRFEW I'm experiencing exactly this issue. I recently started working on MacOS and setup VSCode and (for some reason, I never knew about this before) discovered
Control + K and
O to open the
output.calva-repl (because I code on my main monitor and place the repl in my laptop screen maximised.) . But then I found the same issue as others have mentioned here. Unlike the split-plane repl, the popped-out repl didn't automatically scroll to the bottom. I fixed this by installing the AutoScroll extension and enabling it on the popped-out repl window which works great, however there's still one remaining problem. Not sure if this is a VSCode thing, but the REPL only outputs until the top half of the screen. So unlike the normal repl inside VSCode window where the latest repl output is always at the bottom, this repl output is in the middle. So the bottom half of my repl window is just empty space that it should be using. I'm not sure if this is due to "padding", honestly I have no idea how it works or what options I need to enable. Any ideas on how I could solve this?