posit-dev / posit-dev/air

Unindent binary chains in more contexts

Open
#232 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
446
Forks
32
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Only in <- and if / while? Probably easier and more consistent to do it everywhere, including in function calls.

if (
  foo &&
  bar
) {}

x[
  a == 3 |
  b == v, 
]

In these examples the first line is persistent so the following is allowed as well:

if (foo &&
    bar) {}

x[a == 3 |
  b == v, ]

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.

Research direction

Start by locating the formatter logic that handles binary-chain indentation and reproduce the R examples from this issue. Done means chains are unindented consistently in assignments, conditionals, loops, and function calls while preserving the shown persistent indentation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.