Skip to content

maddyblue/acmewatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

acmewatch

An acme autoformatter configurable via TOML.

Forked from acmego.

Configuration

File location: $HOME/.config/acmewatch.toml.

The file is made up of an array of formatter tables with members:

  • match: String array of globs.
  • cmd: String command to run.
  • args: Arguments to pass to the command.

Commands must output the new file contents.

Generally the file contents is passed as stdin to the command. An argument in args that is $name will be replaced by the filename and stdin will no longer be populated.

Example

[[formatter]]
match = [".go"]
cmd = "goimports"
args = ["$name"]

[[formatter]]
match = [".rs"]
cmd = "rustfmt"
args = ["--edition", "2018"]

[[formatter]]
match = [".js", ".jsx", ".tsx", ".ts", ".css", ".html", ".less"]
cmd = "prettier"
args = ["--config-precedence",  "file-override", "--use-tabs", "--single-quote", "$name"]

[[formatter]]
match = [".py"]
cmd = "black"
args = ["-", "-q"]

About

configurable acme file formatter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages