Closed brodybits closed 9 months ago
Feel free to open a PR and please add an end to end test such that the effect of the flags are clear. No objections on the future per se 😅
Does not that already exist (--indent
)? https://github.com/macisamuele/language-formatters-pre-commit-hooks/blob/f118bd857350e89a76faa4cc5092e9d53dbe3677/language_formatters_pre_commit_hooks/pretty_format_toml.py#L23-L28
https://github.com/macisamuele/language-formatters-pre-commit-hooks/blob/f118bd857350e89a76faa4cc5092e9d53dbe3677/language_formatters_pre_commit_hooks/pretty_format_toml.py#L62
I was about to create an issue for spaces_before_inline_comment
when I saw this, or is this what is meant?
https://github.com/macisamuele/language-formatters-pre-commit-hooks/blob/f118bd857350e89a76faa4cc5092e9d53dbe3677/language_formatters_pre_commit_hooks/pretty_format_toml.py#L61
@alkatar21 thanks for the check (did not had effective time to open the code).
The requested feature seems to be already supported via --indent
argument.
Going to close this issue for now.
If you feel that having customisation on the comment flag as well feel free to open a PR with it and I will be looking into it.
A general rule of thumb, the library aims to reduce bikeshedding on formatting options. For this reason I have the usual tendency of not adding too many configurations as they usually lead to more discussions on "style" wrt actual content of the changes. Still, if we see a reason for adding it I would be fine.
I think an "
--spaces-indent-inline-array
" option similar to the--spaces-indent-inline-array
option intoml-sort
would be helpful.My workaround is to simply call
toml-sort
CLI command with this option.(I may still use this toolset for the
pretty-format-ini
command.)I may raise a PR for this, time permitting.