This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (4)
- # asami (11)
- # babashka (1)
- # beginners (70)
- # bitcoin (2)
- # calva (68)
- # cider (311)
- # clara (1)
- # clj-kondo (58)
- # cljsrn (18)
- # clojure (37)
- # clojure-australia (1)
- # clojure-europe (22)
- # clojure-poland (6)
- # clojure-serbia (2)
- # clojure-spec (9)
- # clojurescript (11)
- # conjure (4)
- # crux (6)
- # cursive (16)
- # data-oriented-programming (21)
- # datahike (1)
- # emacs (10)
- # events (1)
- # fulcro (9)
- # girouette (2)
- # graalvm (52)
- # graphql (2)
- # jobs-discuss (5)
- # lsp (8)
- # malli (8)
- # off-topic (17)
- # other-languages (46)
- # pathom (17)
- # portal (2)
- # shadow-cljs (11)
- # slack-help (2)
- # sql (47)
- # tools-deps (14)
- # tree-sitter (1)
Yesterday I got an update of VSC (on Windows 10) and clojure-lsp would not get past the initialization phase anymore. Following the recent instructions from @borkdude fix the issue!. Thx @borkdude 😄. (Perhaps you should add this to the Calva doc because now I only remembered because it was mentioned so recently)
rm -rf .lsp/sqlite.db rm -rf .clj-kondo/.cache mv .clj-kondo/config.edn .clj-kondo/config.backup.edn
@pez, I'm not sure how this works, can/should I raise the PR myself (happy to do it, just want to be sure that it is ok for me to do that)?
Not sure what you mean by raising the PR. But what we usually do is to first create an issue, then file a PR addressing that issue. In this case the issue is extra good because it will serve as documentation as well, for people checking issues when running into problems. See How to Hack on Calva on the wiki if you are unfamiliar with the ceremony involved. Though I seem to recall you have filed PRs before?
I think the descriptions around how to hack on the docs is a bit lacking. So if you set things up such that you can run the docs web server locally, please consider updating the wiki with what might be missing.
Made the issue here: https://github.com/BetterThanTomorrow/calva/issues/1056.
Hi. I'm a beginner and followed a https://www.notion.so/Beginner-Clojure-Environment-Setup-Windows-36f70c16b9a7420da3cd797a3eb712fa#6a53854de58d4f07ba6319d868fba29c to get my VSCode+Calva+Win10+WSL2(Ubuntu20.04) dev environment up and running. Everything seems to be running and I can evaluate my code via REPL, but I noticed that in my setup, I'm missing the "CLJ REPL" named editor (as visible https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F69456039-0a80-40fa-8f64-ad8f0371348f%2FUntitled.png?table=block&id=3d9da936-6132-488e-857d-0f603526f679&width=3670&userId=&cache=v2), instead I have the "output.calva-repl" open. Did I mess up the setup somehow or is the guide out-of-date?
Hello and welcome, @email113! That guide is a bit out of date. We have replaced that REPL window with the output repl you see now. Since you are a beginner I want to give you the tips of not using the output repl window so much as a repl. Most often it is more effective to type that kind of code into
(comment …) forms in the clojure files and evaluate them from there (`alt+enter`).
Right, using the alt+enter was the way that I verified that at least something worked with the setup. 🙂
Also, you don’t need to install the
clj-kondo extension. It is included in Calva (sort of).
I almost gave up on the setup when I started reading http://clojure.org. That page leaves the impression that Windows is not a viable dev platform at all. Unless one is willing to use alpha-grade sw.
I haven't touched programming in almost 20 years, not counting some small VB stuff with office suite.
It is a bit of a bother to set things up on Windows. I think most Clojure people use WSL there.
For Clojure/Calva use with WSL, see this by Borkdude: https://blog.michielborkent.nl/2020/07/26/remote-wsl2-clojure/
Windows is very much a second grade citizen when it comes to tooling in Clojure, but there are options.
E.g. I made https://github.com/borkdude/deps.clj which offers a binary which is a drop-in replacement for the clojure CLI which works in
I was going through the available channels on this Slack but I stopped after the first five pages and still being on the "C"s 😉
@email113 If you install this VSIX in vscode (Extensions pane -> meatballs menu -> Install from VSIX), there is a new command there: Fire up the Getting Started REPL. https://11740-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.177-1040-getting-started-repl-365e39c5.vsix
Ah, now I understand. Would be cool to be able to install from a URL, but you’ll need to first download.
It’s very much work in progress. You can read a tad more about it here: https://clojureverse.org/t/dram-is-an-interactive-beginners-clojure-guide-in-the-making/7268/
Awesome. Run that command and wait a few seconds and you should have a REPL started and three files to REPL your way through. The third one is pretty big, and will grow even more as I finish up some kind of
Forum thread, here, and as issues on this repo: https://github.com/BetterThanTomorrow/dram You can mix it up, whatever makes sense. 😃
Already found a typo and an area that should get a clarification .. just give me while
If you like you can fix the typo’s by PR. But I’ll take the feedback in any form with great gratitude 😃
hi guys, for some reason the "ctrl+alt+c i" shortcut does not appear to have any affect. "alt + enter" works, setting breakpoints with #break or debugging with #dbg works - only this shortcut doesn't work.. I am working on kubuntu 20.04 - will appreciate any help:)
Same here after the last VSC update (on Windows). "ctrl+alt+c i" still works but it is not decorated anymore
Hey Eric, would you mind chiming in on this issue with more details, such as Windows version (like 10 home/pro, etc), and whether it happens with lein or deps projects. https://github.com/BetterThanTomorrow/calva/issues/1055 I'm not certain they're related but want to investigate more before making separate issues. I can't reproduce this issue on Windows 10 Pro or Manjaro Linux with VS Code 1.54.1. Both decorations and the debugger work as expected in both.
@U9A1RLFNV sorry for the delay, it's windows 10 enterprise using Lein. Happy to provide more details but please allow for some delay as Clojure is a hobby project for me so I'm not working on it every day. Version: 1.54.1 (user setup) Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8 Date: 2021-03-04T22:38:31.419Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 188.8.131.52-electron.0 OS: Windows_NT x64 10.0.19041
https://github.com/BetterThanTomorrow/calva/issues/1055 done:) thanks!
@pez the name isn't a reference to Clockwork Orange, it's a reference to an homage to Clockwork Orange done in "Me, Earl and the Dying Girl"
Dear Calva friends. Here’s a new VSIX for the Getting Started REPL feature for you to test. The update here is that if you have tried the feature before with earlier dev builds, you’ll get prompted about wether to create a new temp dir or reuse the existing one + files. This since the guides might have been updated, but you might want to keep any experiments you’ve conducted in the already downloaded files. https://11848-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.177-1040-getting-started-repl-87bf4858.vsix The prompt looks like so:
Is it possible to see the intermediate results of a evaluation with Calva. E.g. I would like to better understand what happens on each step of:
(as-> 15 $
`(range 1 $ 3)`
`(interpose ":" $))`
Can I somehow inspect e.g. the output of range?
You may be able to use the debugger by placing #dbg before that top level form, if it is a top level form: https://calva.io/debugger/
You could also use a spy function as seen here: https://clojure.github.io/tools.logging/#clojure.tools.logging/spy. Just need to add clojure.tools.logging as a dep in your project
Many times for small experiments like this though, you can copy an expression out into a comment form, replace variables, and run it there. Or, if there aren't variables in it you can run it directly from where it exists by placing the cursor before or after it and running the command to evaluate the current form
Another method is to
def the variables in the expression, then run it in place as I mentioned above
So you could eval
(def $ 100) then place your cursor here:
And evaluate the current form (not top level) -
(as-> 15 $ (range 1 $ 3)| (interpose ":" $))
I think CIDER has an Evaluate up to (or some such) command. It evaluates the thread up to where the cursor is. Please file an issue with that feature request on Calva, @email113.