Does anyone know how to customize Clojure indentation in Vim? I’m writing some core.logic code and I would like to get run* and fresh formatting the same as let. I tried adding these to lispwords but it doesn’t help, perhaps because vim-sexp is involved, but looking at the vim-sexp source doesn’t reveal how it would indent run* and let differently.
Oh, it looks like lispwords was working, just that somehow I got shiftwidth=8. set shiftwidth=2 fixed it all up.
fwiw, you want :help clojure.txt. vim-sexp doesn’t get too involved with indentation.
BTW :help clojure.txt didn’t seem to work for me (maybe because I’m using neovim), but :h clojure-indent had all the details. Weirdly, even though the help text said function indenting is “two spaces” it appears to indent by shiftwidth instead.
For anyone interested, :h clojure-syntax has some goodies too.
It might be because I've installed the more up to date version from GitHub
Are you using LSP at all? if so, you can set some formatting rules with clj-kondo.