Skip to content

NicksWorld/schemefmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

schemefmt

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

TODO:

  • Use patterns to decide if argument alignment should be skipped, similar to lispwords in neovim. This may make max-indent less necessary.

About

A simple, opinionated, and configurable scheme formatter with support for Skribe.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages