This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # asami (1)
- # aws (2)
- # babashka (5)
- # babashka-sci-dev (162)
- # beginners (68)
- # biff (1)
- # calva (26)
- # circleci (4)
- # clj-kondo (5)
- # cljs-dev (7)
- # clojure (84)
- # clojure-europe (15)
- # clojure-uk (1)
- # clojured (2)
- # clojurescript (19)
- # conjure (1)
- # datomic (5)
- # emacs (2)
- # graalvm (20)
- # honeysql (6)
- # improve-getting-started (2)
- # kaocha (3)
- # lsp (31)
- # off-topic (7)
- # pathom (7)
- # releases (1)
- # shadow-cljs (1)
- # spacemacs (1)
- # vim (30)
Looking at a video that uses atom to edit clj. For the evaluated results, it is possible to expand the nested data structure right inside atom. Does Calva also has the same functionality?https://youtu.be/rh5J4vacG98?t=1097
I would recommend looking at Portal. It has a VS Code extension and Calva has built-in keybindings to
tap> values into Portal and then you can navigate around the data structures, even using
There's a #portal channel if you want to know more.
(Atom is losing ground to VS Code and ProtoREPL is unmaintained at this point, although there is Chlorine now which is well-maintained)
There's also an online demo of Portal https://djblue.github.io/portal/ where you can load demo data and then play with it in the browser (the browser version of Portal was the original, then the VS Code version, and now there's an IntelliJ/Cursive version as well!).
I am using portal in vscode now. One thing I really like from the above video is that, no need to open an extra window on the size. The values are directly shown (expanded) along side the code. An extra window is often times overkill and takes much screen size.
Ah, fair enough. I use Portal instead of having a REPL window visible so my screen is code on the left, Portal on the right split maybe 60/40, and I hide/show the explorer/git/etc panel as needed.
I started using REBL when it was released for
tap>'d data, then switched to Reveal, then to Portal (just before it sprouted the VS Code extension). I like that it's just another tab in VS Code that I can move between groups and so I can have one big group filling the whole screen or split-screen with two code views, or have code + Portal side-by-side.
I've started added some custom REPL command snippets to navigate Portal without leaving code, so I can expand/collapse parts of the most recently-tapped value.
I don't know how flexible VS Code's inline results machinery is -- I know the Chlorine/Clover maintainer has complained that the inline tree view for results that he has for Chlorine in Atom doesn't seem to be possible in Clover for VS Code...
Oh, calva has built in keybindings to tap values to Portal? Is there a demo somewhere that shows how to get things working with Calva and Portal? My understanding was that the VSCode extension started portal outside of the JVM.
ctrl-shift-t t (current form or selection) and
ctrl-shift-t space (top-level form) are generic
tap> invocations -- which will end up in any tap listener (REBL, Reveal, Portal, etc).
My VS Code
settings.json on GH has a custom REPL command snippet to start Portal: https://github.com/seancorfield/vscode-calva-setup/blob/develop/settings.json#L238 -- if you have the Portal extension installed in VS Code, you can tell the backend (the Portal launcher) to launch into VS Code itself. The same for the IntelliJ plugin version of Portal.
I have some more stuff to add to my Calva/Portal setup and then I'll do a screencast about it and write it up in a blog post.
Ah thanks @U04V70XH6 - I thought that Portal and Calva had a tighter integration without project specific settings. Perhaps I will need to open an issue to discuss.
@U7PBP4UVA I'm switching from Clover to using Calva's REPL stuff so I'm rewriting all my Clover customization to REPL snippets in Calva and that includes my Portal integration. For both Clover and Calva, it's worth having a shortcut to launch Portal but the mechanics are identical.
I'm literally copying code from my Clover
config.cljs into Calva's REPL snippets 🙂
> I thought that Portal and Calva had a tighter integration without project specific settings @U7PBP4UVA I'm curious as to what "tighter integration" you're thinking of? Portal launches inside VS Code so it's "just another tab" like everything in VS Code.
I have a (perhaps stubborn) refusal to include Portal in my CLJ project deps, and I'm doing both CLJ and CLJS development. So I'd like to use Portal solely as an editor element. That is, I expect: • A special window like calva.output (done) • a command to show it/hide it • A command to send the last result to portal. Perhaps I'm looking for an equivalent to CIDER inspector, that works without any special configuration.
:portal is in my dot-clojure
deps.edn, not in my project. But my dev REPL ends up with a bunch of tools -- and I start it outside VS Code.
Do you have nREPL active when you're developing @U7PBP4UVA? That doesn't go into production tho', right? Portal's just the same surely?
I do, but nRepl takes care to minimize and vendor dependencies. Portal brings in a whole web server :) As I said, perhaps my refusal is unreasonable. I still have to figure out a way to do CLJS with the same setup though. I thought that Calva having access to both the dev env and the nRepl results can just shuffle data over to portal.
I've explained my desired workflow here, hope that's helpful: https://github.com/BetterThanTomorrow/calva/issues/1327#issuecomment-1120367038
Reminder to check out #joyride if you script VS Code using Clojure sounds interesting. With Joyride you can also make Calva do new things. E.g. One of the examples in the repository adds a Toggle Ignore Form command, something that is frequently requested in this channel.