- Automatically format single files or directory
- Configurable with cli-flags
- Option to only preview file
- Download query-fmt-{platform}-x86_64.zip
- Unzip it
- Run it with query-fmt
- Install with
cargo install --git https://github.com/max397574/query-fmt.rs.git
- run with
query-fmt
- Clone this directory with
git clone https://github.com/max397574/query-fmt.rs
cd query-fmt.rs
- Build with
cargo build --release
- Run with
./target/release/query-fmt
A formatter for tree-sitter queries
Usage: query-fmt [OPTIONS] <file>
Arguments:
<file> Name of the file or directory to format
Options:
-p, --preview Preview the formatted file
--no-print-filename Don't print filename in output
-i, --indent <INDENT> Indent of nested things [default: 2]
-l, --list-indent <LIST_INDENT> Indent of list items [default: 1]
-h, --help Print help
-V, --version Print version