Fork me on GitHub

Hi, is there a way to configure zprint to match calva formatter output? Maybe there is a config file somewhere?


I am not aware of one. There might be though. What you should be looking for is a config that replicates the behaviour of cljfmt defaults.

👍 1

Thanks, I will try to find 🙂


I’m seeing an issue where Calva Refactor: Expand Let duplicates let variables. (Aside, this is a great feature!) I’ll paste in the reproducer in the thread. I’d file a bug, but I don’t know if it’s on Calva, kondo, or clojure-lsp


it's a clojure-lsp one!


that's a not common used refactor, so it probably have bugs 😅


The idea I had was to introduce a new variable and “push” it up to a previous let: start with (when (seq [])  (let [x 5]   (when (= x 5)    (seq (vec (inc x)))))) 1) select (inc x) and use Calva Refactor: Introduce Let choose improved-x as the variable name (when (seq [])  (let [x 5]   (when (= x 5)    (seq (vec (let [improved-x (inc x)]          improved-x)))))) 2) stand on improved-x and Calva Refactor: Expand Let (when (seq [])  (let [x 5]   (when (= x 5)    (seq (let [improved-x (inc x)]       (vec improved-x)))))) 3) stand on the new improved-x and Calva Refactor: Expand Let (when (seq [])  (let [x 5]   (when (= x 5)    (let [improved-x (inc x)]     (seq (vec improved-x)))))) 4) stand on the new improved-x and Calva Refactor: Expand Let (when (seq [])  (let [x 5]   (let [x 5      improved-x (inc x)]   (when (= x 5)    (seq (vec improved-x)))))) We have x twice now. If we do Expand Let with improved-x again we’ll see (when (seq [])  (let [x 5     x 5     improved-x (inc x)]   (when (= x 5)    (seq (vec improved-x)))))


@UKFSJSM38 I’ll file a github issue on clojure-lsp


Returning to Calva after some time away, I get this error message. “Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. ” In fact, Java 1.8 is installed, and in fact everything works as before, but I don’t know what has caused this error to appear. VSCode is also prompting me to install a “Java Extension Pack” for this Clojure project, which it didn’t do before. Any clues?


I think VS Code would only suggest that if you have Java files in the project. The error message about build path is not from Calva. What kind of project is it?


It’s a project defined by Sean Corfield’s clj-new. But I don’t see any place where a Java compiler version is specified, and there are no Java files in my project.


Very strange and interesting! Can you create a reproduction project?


Here’s a repro, direct from clj-new:


Maybe it’s the pom.xml file that causes VS Code to suggest the Java extension be installed?


Brilliant! Yes, removing that not only stopped the Java extension suggestion but also eliminated the warning about the JRE. Thanks!


Hmm. So I'll have to try this. Never seen a complaint liked that, and I have quite a few projects created using clj-new…


It may have something to do with the fact that I just updated clojure yesterday using brew on a Mac M1. With Apple silicon, brew keeps its software under /opt/homebrew/bin rather than /usr/local/bin. It may be that some config files are messed up.


Upgrading to an M1 caused some brew havoc for me as well. I exported my package list and imported it to a create a new package repo. Loving the M1! Such a fantastic machine.


Hi there, is there a way in Calva to jackin to the bash terminal instead of defaulting to the powershell?


I don’t think so. How come you need it?