A simple and opinionated scheme formatter.
The formatter supports setting the indent amount, maximum indent for argument alignment, indentation of kwargs, and special case indentation for Skribe text-blocks, if enabled.
The formatter uses a very simple tokenizer, not an AST, and as such will handle more or less any input it is given, though it may produce incorrect indentation in some more unusual cases.
Usage: schemefmt [OPTIONS] [files]...
Arguments:
[files]... Files to read, defaults to stdin
Options:
-i, --inplace Modify files inplace instead of outputing to stdout (use with caution)
--indent <indent> Default indent for scopes [default: 2]
--max-indent <max-indent> Maximum indent for first-argument alignment [default: 4]
--skribe Treat square brackets as a Skribe text-block
--skribe-indent <skribe-indent> Indent for skribe blocks [default: 1]
--indent-kwargs Whether to values of keyword arguments should be indented
-h, --help Print help
- Use patterns to decide if argument alignment should be skipped, similar to lispwords in neovim. This may make max-indent less necessary.