Calva: Auto indent not working anymore

Created on 3 Jul 2019  路  11Comments  路  Source: BetterThanTomorrow/calva

Hello, I have an issue where at some point code doesn't get auto indented anymore. Basically everytime i hit enter the cursor goes back to column 0, whereas before it would start from the proper indented column.

I tried changing back and forth a few settings but I didn't have any success.

All 11 comments

Hello! Some questions:

  • Is this in all Clojure files?
  • Which version of Calva are you using?
  • Does hitting tab indent things?

I'm experiencing the same issue.

  • Yes, this happens in all .clj files.
  • 2.0.20
  • Sometimes tab will put the cursor in the correct location, but other times it will just wrap back to the end of the previous line.

Downgrading Clojure Warrior from 0.2.0 to 0.1.8 fixes the problem for me.

Interesting. Thanks for sharing that info. Gives me something to dig from.

I can't reproduce this. What more can you tell me about your setups? OS, version of VSCode. Stuff like that.

The changes in Clojure Warrior are summarized here: tonsky/clojure-warrior/issues/12. I wonder how on earth that could cause this problem.

However, I have had occasions when the rainbow thing doesn't work and I have gotten it working by toggling some Calva indentation settings, so there does seem to be a conflict there somehow.

Yes, one more thing, @alanmarazzi and @bciummo, are you using the calva.fmt.newIndentEngine?

Yes, one more thing, @alanmarazzi and @bciummo, are you using the calva.fmt.newIndentEngine?

The issue appeared before toggling it on and off and it didn't change anything. I'm on Windows 10, VSC version 1.36, Calva version 2.0.20 and Clojure Warrior version 0.2.0.

Here's a video of what I mean https://streamable.com/9wekg

Thanks @alanmarazzi , does it matter for you if you are using Clojure Warrior 0.1.8 or 0.2.0?

I confirm that version 0.1.8 fixes the issue

Fixed in Clojure Warrior 0.2.1

Thanks everyone!

Was this page helpful?
0 / 5 - 0 ratings