eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Autodetect and match prevailing indentation
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
When editing an existing file with indentation that does not match the current formatter settings, Eclipse does not adapt to the prevailing indentation when editing. #3669 details some specific cases that can be fixed, but it won't address them all. When manually indenting or auto-indenting when creating a new block, the indent size is set to the formatter size but it would be nice if it matched the existing style. It is nice that it will keep a manual indent on subsequent lines in a block, but it would be good if you didn't need to adjust on the first line in the block.
When formatting the code explicitly such as with the formatter or fixing indentation, it should honor the settings (no change to current behavior).
This feature is implemented in other IDEs such as ([VS Code](https://code.visualstudio.com/docs/editor/codebasics#_autodetection) and [IntelliJ](https://www.jetbrains.com/help/idea/indentation.html#detect-indentation).
Contributor guide
Assessment
This issue has not been assessed yet.