Open
Description
Using the Eclipse formatter (via Spotless), we're currently limited by the global nature of the continuation_indentation setting. This results in undesired formatting when using chained methods like:
var stream = Stream.of(
[config (3).txt](https://github.com/user-attachments/files/19683922/config.3.txt)
item1,
item2
)
.flatMap(Collection::stream);
We'd like to customize indentation specifically for Stream.of() or similar method patterns to produce the following:
var stream = Stream.of(
// Desired: 8 spaces for arguments inside Stream.of()
item1,
item2
)
.flatMap(Collection::stream);
Problem
- continuation_indentation affects all method chains, so it's impossible to tune just one specific case.
- Formatting gets harder to read when method chains are involved, especially for deeply nested calls.
- We'd like more flexibility — such as per-method or per-pattern indentation control.
Request
Introduce a way to:
- Apply custom indentation levels based on method name or type.
- Optionally override continuation_indentation when a method is in a known list (like Stream.of, List.of, etc.)
Notes
We're using Eclipse formatter via Spotless, which just forwards to this engine. They've redirected us here for this enhancement.
Config PFA
Metadata
Metadata
Assignees
Labels
No labels