Range formatting
Is your feature request related to a problem? Please describe.
I would like to be able to format specific ranges of files.
For example, given the following file:
if true; then
fi
if false; then
fi
I would be able to format only the second if statement.
Describe the solution you'd like
Two parameters for the CLI:
-
--range-startto specify from which line of the file to start, preferably starting from 0 -
--range-endto specify until which line to format
Additional context
A popular code editor, Neovim, has support for range formatting but it requires the formatter to have options to specify the range.
If I understand correctly, this would be only used in conjunction with --stdin mode?
If I understand correctly, this would be only used in conjunction with
--stdinmode?
Correct! :)
Should be easy enough to add :slightly_smiling_face: