This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-19
Channels
- # admin-announcements (1)
- # adventofcode (14)
- # announcements (2)
- # asami (7)
- # babashka (9)
- # beginners (41)
- # calva (43)
- # cider (31)
- # clerk (2)
- # clojure (34)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-norway (166)
- # clojure-uk (7)
- # clojurescript (4)
- # datomic (1)
- # fulcro (10)
- # garden (1)
- # hoplon (2)
- # humbleui (4)
- # hyperfiddle (12)
- # jobs-discuss (6)
- # quil (6)
- # ring (6)
- # shadow-cljs (55)
- # squint (8)
- # xtdb (26)
I experimented with Live Share today (for the very first time): I shared from a desktop VS Code + Calva project to http://vscode.dev (web) and saw that Calva switched to a Clojure notebook format in my desktop (to match what I saw in the web version?). I could run individual cells but they didn't seem to maintain "history" between cells -- so eval'ing (ns foo.bar (:require '[some.thing :as st]))
in cell 1 worked, but then eval'ing (st/wibble)
in cell 2 failed with st
not known.
What's the current status of Clojure editing in http://vscode.dev these days? And what are folks realistically doing with Live Share?
It’s a LiveShare issue causing the notebooks editors to be used. https://github.com/MicrosoftDocs/live-share/issues/4765 You can disable the Calva Spritz extension to stop that from happening.
The issue with st not being defined properly is strange. Maybe Calva fails to figure out the namespace for the second evaluation…
Oh, so if I turn Spritz off, I'll get regular Calva-powered open files?
That’s the intention. But should work, because without the Spritz extension there’s no notebook file extension association going on.
I was hoping Spritz would be a very temporary thing, but the VS Code team does not seem to think the issue is worth spending time on.
Does disabling Spritz affect anything else except Live Share?
OK, so no Spritz, no notebooks at all for Clojure, regardless of Live Share? (just so I'm clear)
Live Share is kind of amazing...
I'm unable to use 'Go to definition' for clojure.core functions. It works for the things I've defined in my namespace.
nREPL dependencies configured:
nrepl: 1.0.0
cider-nrepl: 0.28.5
cider/piggieback: 0.5.3
clojure-lsp version configured: latest
Calva version used: v2.0.403
clojure-lsp version used: 2023.10.30-16.25.41
Does it require something extra?try:
• rm -rf .lsp/.cache
(to force rescan)
• restart vscode
• check server logs (https://calva.io/clojure-lsp/#viewing-the-logs-between-the-client-and-server Opening the Server Log File)
(BTW @U0ETXRFEWwould be nice to link directly to those headings "Opening the Server Log File", it's not the first time I can't do that :/ )
I don't see clojuredocs on hover anymore. I'm guessing that had something to do with me deleting the cache. edit: can see the documentation after starting the repl.
the clojuredocs info is requested after server startup and take some seconds, then cached
@UKFSJSM38 The headings are linkable, like so: https://calva.io/clojure-lsp/#opening-the-server-log-file Do you mean it doesn’t scroll to the top?
> edit: can see the documentation after starting the repl Does go to definition also work when the repl is started?
@UKFSJSM38 @U0ETXRFEW I created a new project via lein and it seems to be working fine now. Earlier I just had a single file inside a folder. Thank you!
@U0ETXRFEW ah, I thought that wasn't enable because in clojure-lsp there is a permalink icon, but glad it works, not sure if you typed the heading manually or clicked somewhere else
ah yeah, it's important to have a minimal project concept so clojure-lsp can know the project type and get the classpath @U05H1PF60G1
Are you using mkdocs for the clojure-lsp site, @UKFSJSM38?
yes, mkdocs-material, I have a image for that https://github.com/clojure-lsp/docs-image
Found it. It’s fixed now. We’re also using mkdocs materials. Thanks for pointing that out!
Do we have a nice printable Calva cheat sheet?
Anybody know of a way to add the portal middleware when Calva jacks in? (see also: https://clojurians.slack.com/archives/CBE668G4R/p1681508197454209). @seancorfield what's your workflow in this regard?
See https://github.com/seancorfield/dot-clojure
My user deps.edn
has a :dev/repl
alias I use when jacking-in. It starts a REPL based on whatever it finds on the classpath -- see the tail end of https://github.com/seancorfield/dot-clojure/blob/develop/src/org/corfield/dev/repl.clj for how it decides what middleware to add.
Then my project's typically have VS Code settings for Calva to automate the jack-in process: https://github.com/seancorfield/next-jdbc/blob/develop/.vscode/settings.json
(in particular, the calva.replConnectSequences
jack-in adds aliases for Clojure 1.12 (Alpha 5), Portal, :test
, and :dev/repl
-- 1.12 so I can add dependencies on-the-fly to my REPL without a restart -- :portal
, :1.12
, and :dev/repl
all come from my user deps.edn
file)
Note that my dot-clojure
repo is both a library (with org.corfield.dev.repl
in it) and a user deps.edn
file from which you can copy whatever aliases you want 🙂
Thanks Sean! I'm excited to use this!
I have your user deps.edn
installed. When I run the calva Jack-In command, should I expect to see all your aliases in the pick menu? I don't. Nor does it appear to let me free-type anything. I could try using the calva.replConnectSequences
setting you linked to.
I did try clj -M:dev/repl
from my project root and it seemed to work fine, thus validating that my user deps.edn was located fine.
lol, it was right above the message that I linked to in my first post! I'm just 8 month behind you Sean!
I'm livin' on the bleedin' edge 🙂