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

Allow cli args for options #213

Closed
p00f opened this issue Jun 26, 2021 · 2 comments · Fixed by #221
Closed

Allow cli args for options #213

p00f opened this issue Jun 26, 2021 · 2 comments · Fixed by #221
Labels
enhancement New feature or request

Comments

@p00f
Copy link

p00f commented Jun 26, 2021

Can you add CLI args for formatting options (atleast for indent_type, indent_width and line_endings) for per-file formatting within editors?

@JohnnyMorganz
Copy link
Owner

Added in #221
These are the options available to use:

stylua 0.9.3
A utility to format Lua code

USAGE:
    stylua.exe [FLAGS] [OPTIONS] [--] [files]...

FLAGS:
    ...

OPTIONS:
        ...
        --column-width <column-width>        The column width to use to attempt to wrap lines
        --indent-type <indent-type>          The type of indents to use [possible values: Tabs, Spaces]
        --indent-width <indent-width>        The width of a single indentation level
        --line-endings <line-endings>        The type of line endings to use [possible values: Unix, Windows]
        --quote-style <quote-style>          The style of quotes to use in string literals [possible values:
                                             AutoPreferDouble, AutoPreferSingle, ForceDouble, ForceSingle]
        ...

ARGS:
    <files>...    A list of files to format

Unsure on when I will get a new version release out yet

@p00f
Copy link
Author

p00f commented Jul 3, 2021

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants