In the clojure-lsp refactorings, I realized that I didn't see much for automatic code formatting (specifically, indentation) during/after a refactor. Poking around in the docs, it seems like formatting is only done when textDocument/formatting (or rangeFormatting) is sent from the client. Is this correct? If so, I guess the approach for refactoring code is to get the code into approximately the correct form (wrt whitespace) and expect that the user reformats afterward?
yes, we do it after clena-ns only, and it's optional by a opt-out flag
but yeah, I think we could think in a global apply format after refactor flag
Maybe it would be nice... but I wasn't actually missing it as a user. At least not yet. I was just looking at unit tests and realized I hadn't thought much about formatting the transformed code for some reason! But yeah, as a user it would probably be a nice to have
one of the reasons was that cljfmt is slower for formatting regions than a full string/buffer