Funky formatting with blank lines and returns
Something changed recently that is messing with blank lines between forms
....
(is (= (simplify-new example) (simplify-new operational)))))))))
(def scenarios-existing
...
If I do a return at the end of ))))))))) it creates a new line, then immediately formats it away.
If I do a return between the forms, it creates a new line then immediately formats it away leaving my cursor at the beginning of the second form.
The only way I can get blank lines in there to start writing the next form is to put my cursor at the beginning of the second form and hit return.
This is super annoying. Maaaayyyyybbeee could get used to it if by adding a new form on the blank line between these form, the formatter would pad the top and bottom, but it doesn't.
Sounds hellish! Which version of Calva are you using?
2.0.501. clojure-lsp set to latest. Went back through my settings. VSCode is saying that Calva is overwriting "formatOnType" to be true.
I can temp fix it, but I have to manually set it to false in settings.json. The setting unchecked doesn't override the default calva is setting
What it looks like with no settings.json changes.
After manual settings.json changes
The setting may have been this way for a while. After disabling it on whole, when I hit return inside a element, it no longer indents to the right line to start the next value.
(def test
[1
])
This is what I expect after the same return.
(def test
[1
])
Format on type should be on if you want Calva's help to indent correctly when you enter a new line. But it shouldn't mess with you like it has started to do. What's your setting for new indent engine? I'm thinking it may be disabled, causing Calva to use it's formatter for indenting and thus triggering the bug. I could also be completely wrong about this.
cc: @pbwolf You have any clue what could be afoot here?
new indent engine is indead off. That has not changed on my end though.
what's the difference between the two?
What has changed is the formatter. We have some regressions. The difference between the old and the new indent engine is that the former uses the formatter, and the latter does not. So you can probably avoid the bug you are encountering by using the new indent engine (which is the default).
Thanks, will do
Reopened. We still need to fix the issue. 😄