Fork me on GitHub

Hey, that ^ VSIX is old! Here’s a new one with support for thread-first arguments: The gif shows the various cases that I have been able to come up with, with @qythium’s help.


Is there a way to configure auto indentation on macros. for instance, I would like to get 2 indents under conjure/mocking

 (testing "testing.."
   (is (= 1 1))))


Calva doesn’t though. At least not yet.


Right now there is no way at all for the user to inform Calva about the indentation settings. The relevant issue is here:


It is old and quite painful for me to see how often I have committed to try fixing it… It is really not that hard. We use cljfmt for the formatting + our own autoformatter that is still in experimental stage and opt-in for users. But it uses a compatible indentation settings format so if we just expose one or two good ways to give Calva the cljfmt indent settings, then both of Calva’s formatters can use it.


Calva v2.0.58 is out. Please upgrade, folks. The changes are: • Fixed: Incorrect red highlights around brackets/paren in specific case • Fixed: “Require REPL Utilities” command is longer broken • Fixed: Hover definition for symbols derefed with @, and quoted symbols • Improved: Signature help-while-typing hover, with active arg markup


Also published clj-kondo VSCode extension v0.0.9 which brings datalog linting and support for compojure macros. You guys and girls get a heads up, since the official announcement will happen later today together with a blog post about the datalog linting.

clj-kondo 8
calva 8
aw_yeah 4
Filipe Silva14:11:54

@pez on the topic of formatting, is there any way to use the same formatting settings that calva has outside of calva?


Not sure I understand…

Filipe Silva14:11:27

I'd like to format my whole cljs project in a way consistent with calva

Filipe Silva14:11:49

ok let me give a practical example


Oh, that should be quite easy.

Filipe Silva14:11:28

I have a cljs project, on that project I use both Calva in the editor and zprint via the npm module (

Filipe Silva14:11:54

when I edit files, calva will format it in a certain way

Filipe Silva14:11:06

I edit a couple of files and save the changes

Filipe Silva14:11:32

then I run zprint over the whole project to make sure all formatting is consistent via a script

Filipe Silva14:11:52

zprint will reformat the calva files in different ways


Calva uses clj-fmt so you will probably need to use that instead of zprint.

Filipe Silva14:11:25

this is mostly a question of configuration: I either configure zprint to match Calva, or the other way around

Filipe Silva14:11:08

(or I figure out a way to use clj-fmt)


If I recall correctly Calva uses default clj-fmt indentation rules. And then it depends on the settings you have for calva-fmt.


Also if I recall correctly it is hard to stop zprint from doing certain things that clj-fmt doesn’t do, so I would guess that using clj-fmt would be your main option.

Filipe Silva14:11:33

ok, I'll look into my options this weekend... maybe I can use shadow-cljs run to run


This is the settings map that Calva uses to configure clj-fmt:

{:remove-surrounding-whitespace? t/f
  :remove-trailing-whitespace? t/f
  :remove-consecutive-blank-lines? t/f
  :insert-missing-whitespace? t/f}
They correspond to settings you have in VSCode for calva-fmt. So feeding clj-fmt that map, with your settings should make clj-fmt produce the same formatting as Calva does.

Filipe Silva14:11:05

ok, will try those


Please let me know how you fare.