When editing a (rather large) deps.edn file, something is adding 2 blank lines between a line comment and the keyword for an alias. I had assume this is cljfmt as lsp is configured to manage the formatting of code, but I have not seen any relevant rules to disable. Any idea if there is a rule to disable to stop these blank lines from being inserted
I never saw something like that, do you have a repro? Is that only happens when formatting the file with clojure-lsp?
Yes, this only happens when I have clojure-lsp managing the formatting with Emacs The file in question is https://github.com/practicalli/clojure-deps-edn/blob/live/deps.edn
Making an edit, especially adding new sections triggers 2 blank lines in what seems to be all the aliases.
Where thoses blank lines are added? I can't repro calling lsp-format-buffer
Oh, I managed to repro
it seems to add 2 blank lines below comments in a map
this is totally cljfmt config and I don't know any rule/config that does that
Maybe @lee knows how to disable that?
Hey ho! 👋
It seems like an issue to raise on cljfmt. Thanks for trying this out. For now I can just kill the hunks that contain these unwanted changes using magit
Yeah nothing immediately coming to mind.
@jr0cket I managed to make a simpler repro:
{:foo 1
;; a
:bar 2}
Formatting this gives me a:
{:foo 1
;; a
:bar 2}
it seems to be related with the extra lines above the comment
interesting! Happy to have a peek when issue is raised at cljfmt
Oh just had a memory of fixing something around this area: https://github.com/weavejester/cljfmt/issues/209 Are you folks on cljfmt master?