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

Document noirfmt.toml #6136

Open
michaeljklein opened this issue Sep 23, 2024 · 0 comments
Open

Document noirfmt.toml #6136

michaeljklein opened this issue Sep 23, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request nargo Noir's CLI development tool

Comments

@michaeljklein
Copy link
Contributor

Problem

noirfmt.toml is undocumented, but can be configured with the following options:

config! {
    max_width: usize, 100, "Maximum width of each line";
    tab_spaces: usize, 4, "Number of spaces per tab";
    remove_nested_parens: bool, true, "Remove nested parens";
    error_on_lost_comment: bool, false, "Error if unable to get comments";
    short_array_element_width_threshold: usize, 10, "Width threshold for an array element to be considered short";
    array_width: usize, 100, "Maximum width of an array literal before falling back to vertical formatting";
    fn_call_width: usize, 60, "Maximum width of the args of a function call before falling back to vertical formatting";
    single_line_if_else_max_width: usize, 50, "Maximum line length for single line if-else expressions";
}

Happy Case

Document how to use noirfmt.toml, its allowed fields, and defaults

Workaround

Yes

Workaround Description

Read the code for nargo_fmt/src/config.rs

Additional Context

No response

Project Impact

Nice-to-have

Blocker Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@michaeljklein michaeljklein added enhancement New feature or request documentation Improvements or additions to documentation labels Sep 23, 2024
@Savio-Sou Savio-Sou added the nargo Noir's CLI development tool label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request nargo Noir's CLI development tool
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants