Title: Add option to indent pipe operator continuation lines
Description:
Currently, JuliaFormatter removes indentation from pipe operator (|>) continuation lines, making long pipe chains less readable.
Current behavior:
bars |>
EMA(10, 20) |>
CUSUM(1) |>
Crossover(:ema_10, :ema_20; direction=LongOnly) |>
@Event(:cusum ≠ 0, :side ≠ 0)
Desired behavior:
bars |>
EMA(10, 20) |>
CUSUM(1) |>
Crossover(:ema_10, :ema_20; direction=LongOnly) |>
@Event(:cusum ≠ 0, :side ≠ 0)
Requested Feature:
Add a configuration option (e.g., indent_pipe_continuation = true) that would preserve or add indentation to continuation lines after pipe operators.
Rationale:
- Improves readability for long pipe chains
- Common pattern in data processing pipelines (DataFrames.jl, data science workflows)
- Aligns with how pipes are typically written by hand in the Julia community
- Similar to method chaining indentation in other languages (JavaScript, Python)
Current workaround:
Using #! format: off comments, which disables all formatting for that section.
Configuration file tested:
style = "blue"
indent = 4
pipe_to_function_call = false
yas_style_nesting = true
Title: Add option to indent pipe operator continuation lines
Description:
Currently, JuliaFormatter removes indentation from pipe operator (
|>) continuation lines, making long pipe chains less readable.Current behavior:
Desired behavior:
Requested Feature:
Add a configuration option (e.g.,
indent_pipe_continuation = true) that would preserve or add indentation to continuation lines after pipe operators.Rationale:
Current workaround:
Using
#! format: offcomments, which disables all formatting for that section.Configuration file tested: