Fork me on GitHub
#emacs
<
2021-11-13
>
dotemacs12:11:09

Tried clojure-lsp for the past week and while nice over all, I spent some time fighting its eager indentation. For example, when adding something like this:

(let [foo something
And pressing RET to add another line, the point would be returned back to the end of the previous line. I’d continue to type and I’d add my code, so that at the end it’d end up looking like:
(let [foo something bar something-else]
I looked in the documentation, to see where I could tweak the settings for indenting, but I couldn’t find anything that would help me to resolve this issue. What should I be looking for to tweak the super eager indentation for clojure-lsp? Thanks

ericdallo13:11:28

Not sure your issue is related with LSP, could you record a gif or a video? Not sure I understand what is happening

vemv14:11:48

sounds odd, deleting newlines seems beyond the scope of indentation. might be electric-indent-mode? lispy-mode? (disclaimer: I don't know much about either)

☝️ 1
practicalli-johnny18:11:11

I experienced similar kinds of issues when using aggressive-indent-mode with cljfmt enabled through LSP. My guess would be electric-indent-mode and cljfmt triggering each other by the changes they are making. Try disable one of those and see if you have the same effects. In the end I switched off aggressive-indent-mode and just use the LSP formatting through cljfmt (although I have disabled some of the rules cljfmt has by default)

colliderwriter16:11:29

did anyone ever add babashka as an ob-clojure backend?

colliderwriter19:11:21

i saw that but the :shebang solution as noted does not put the source in clojure-mode, right? I'll dig into the code.