Add documentation on why we don't support "hanging indent" style

Open Beginner friendly
#278 25 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
r, rust

Research direction

Start with the issue's hanging-indent examples and review the current formatter documentation and behavior around multiline function arguments. Document why the requested style is not supported and show the formatting Air produces, then verify that the explanation matches the existing output.

Written by the indexing model from the issue text.

Description

I would love to something like this:

fn <- function(long_long_long_long_long_long_long_arg1,
               long_long_long_long_long_long_long_arg2) {
    
}

But air gave me this:

fn <- function(
    long_long_long_long_long_long_long_arg1,
    long_long_long_long_long_long_long_arg2
) {
}
Dominant language
Rust
Stars
446
Forks
32
Avg merge
16h 48m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/air

All issues in posit-dev/air

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.