This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-13
Channels
- # announcements (1)
- # babashka (21)
- # beginners (39)
- # calva (10)
- # cljsrn (4)
- # clojure (133)
- # clojure-europe (27)
- # clojure-nl (2)
- # clojure-uk (1)
- # clojurescript (10)
- # code-reviews (19)
- # cursive (1)
- # data-science (1)
- # deps-new (2)
- # emacs (8)
- # events (4)
- # exercism (3)
- # fulcro (14)
- # introduce-yourself (2)
- # lsp (7)
- # malli (2)
- # meander (2)
- # missionary (6)
- # pathom (6)
- # pedestal (1)
- # releases (1)
- # remote-jobs (1)
- # sci (18)
- # tools-build (2)
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?
ThanksNot sure your issue is related with LSP, could you record a gif or a video? Not sure I understand what is happening
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)
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)
To disable cljfmt I use https://github.com/practicalli/spacemacs.d/blob/live/dot-lsp/config.edn#L82
did anyone ever add babashka as an ob-clojure backend?
i saw that but the :shebang
solution as noted does not put the source in clojure-mode, right? I'll dig into the code.