Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabular formatting #113

Open
lionel- opened this issue Dec 17, 2024 · 0 comments
Open

Tabular formatting #113

lionel- opened this issue Dec 17, 2024 · 0 comments

Comments

@lionel-
Copy link
Collaborator

lionel- commented Dec 17, 2024

A comment like # fmt: tabular would instruct Air to format the next expression (which should be a function call) with these rules:

  • The first line of arguments determines the number of columns
  • The remaining arguments are wrapped according to the number of columns
  • Arguments are aligned at commas

This would help with tribble-like data entry but could also be used with list() or c() depending on the use case.

Difficulties:

  • Investigate how to hook into Biome's infra to add this special formatting

  • The formatter may move comments around if they are in peculiar cases, and then a second round of formatting might cause the tabular comment to apply to something else. That's undesirable because we generally want the formatter to be idempotent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant