WebCalm
WebCalm copied to clipboard
[JavaScript] .js sometimes adds incorrect indentation on Enter, though it's correct after Reformat Code
I can't figure out how to reproduce this. I have two projects, and only one of them consistently behaves like this:
const f = function(){
const a = [];
a.filter(b=>true) // Press Enter here
// The cursor is added at this indentation level
.filter(a => true)
.filter(a => true);
}
When I write anything on that line and Reformat Code (Ctrl+Alt+L), it gets moved to the correct indentation level.
const f = function(){
const a = [];
a.filter(b=>true)
// Text is moved to this indentation level
.filter(a => true)
.filter(a => true);
}
I tried creating different files on different locations and restarting IDEA, yet it keeps behaving like this in a larger project, while a more recent and smaller project is always indented correctly right after pressing Enter.
Version:
- IntelliJ IDEA 2024.2.1 (Community Edition) IC-242.21829.142
- WebCalm plugin: 0.11.1