This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-18
Channels
- # announcements (2)
- # babashka (35)
- # beginners (59)
- # calva (17)
- # cider (3)
- # clerk (7)
- # clj-kondo (21)
- # cljfx (9)
- # cljs-dev (76)
- # clojure (98)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-europe (11)
- # clojure-gamedev (4)
- # clojurescript (14)
- # consulting (7)
- # cursive (6)
- # datascript (4)
- # datomic (12)
- # emacs (18)
- # events (2)
- # graalvm (9)
- # humbleui (3)
- # hyperfiddle (18)
- # jobs (4)
- # missionary (12)
- # nextjournal (2)
- # nrepl (7)
- # off-topic (31)
- # practicalli (2)
- # rdf (6)
- # releases (2)
- # scittle (10)
- # xtdb (9)
Today is a general holiday in Finland. I was just browsing the VSCode Calva commands and found there is a Calva: Start or Connect to a Clojure REPL...
=> Fire up Getting started REPL
.
That's nice, since I was wondering that is it possible to quickly start a Clojure REPL for some small miscellaneous tasks. Previously I had a Clojure REPL always running in the background for miscellaneous tasks, and I connected to that Clojure REPL in Calva.
I'm wondering if I can use Joyride to create the same myself? E.g. copy some deps.edn
file from my home directory to some tmp directory (or in the directory I started VSCode), start a Clojure REPL and connect to it in Calva?
By the way. You have in hello_repl.clj
:
;; To see the result at each step in the thread
;; You can also Ctrl+Alt+Enter after each form.
=> The Ctrl+Alt+Enter
is the default hotkey for this. If it is not too much trouble I would appreciate also the command in parentheses, since the user could have reassigned a new hotkey for this command. E.g.:
;; To see the result at each step in the thread
;; You can also Ctrl+Alt+Enter after each form (Calva: Evaluate From Start of List to Cursor, Closing Brackets).
... or the user would like to have his/her own hotkey for this and it would make it easier to find the exact command in VSCode.
Well, this is a minor thing. One can find the command also using the current hotkey (i.e. Ctrl+Alt+Enter
), of course.
Except, now that I went to see this in VSCode Keyboard shortcuts, there are two commands for this hotkey:
• Calva: Evaluate From Start of List to Cursor, Closing Brackets
• Calva: Evaluate Selection, Closing Brackets
So, if the right Calva command is mentioned in the example, there would be less room for misunderstanding which command is used to create the effect mentioned in the demonstration file.
(Actually this is cool, I didn't know there is Calva: Evaluate From Start of List to Cursor, Closing Brackets
command in Calva!) 🙂Damn. I really have to browse through all these examples if there is more cool stuff to learn (and assign the kind of hotkeys that are cognitively closer the ones I already use to evaluate stuff in VSCode - I mostly learned to use these hotkeys when I was using IntelliJ/Cursive, and I have just moved the same hotkeys to Calva since those commands are already in my muscle memory).
> The Ctrl+Alt+Enter
is the default hotkey for this. If it is not too much trouble I would appreciate also the command in parentheses, since the user could have reassigned a new hotkey for this command.
It can be argued that if the user has reassigned the command shortcut, they already know about the command. 😃 But, indeed, we should instead name the command name and mention the default shortcut as extra info. PR welcome: https://github.com/BetterThanTomorrow/dram

It makes me happy the way you choose to spend the general holiday. 😃 Is it Ascension Day you’re celebrating? That’s what we are doing here in Sweden.
You should be able to use Joyride to create that experience yes. I want to note that there is one similar already provided by Calva. Start a standalone REPL (not in project). But you might want to provide default dependencies and such, so please try with Calva. There are also the Babashka, nbb , and Joyride options in the Jack-in menu, that all give you a REPL connected to your editor, with some different reach. Maybe we should add Clojure and ClojureScript there as well…
Thanks! Yep. I think it is Ascension Thursday (Helatorstai). I am not christian, so I'm not sure, I just enjoy the extra vacation day. 😃
Calva is so cool!
Has something changed recently with align-associative command in Calva? It stopped aligning let blocks for me.
yes, it works for maps, but not for let. I used to left-align all "values" in let, but not anymore:
(let [a "baz"
ABC "foo"])
Now its
(let [a "baz"
ABC "foo"])
Could it be something in your file preventing it? The command is using an old version of cljfmt that has problems with some “new” Clojure code, like some namespaced maps syntax, iirc. Try in a file with only that let
form and see if that works.
I'll play more with it and report back.
@UTFAPNRPT read the caveats here: https://calva.io/formatting/#about-aligning-associative-forms