1 stable release
1.6.0 | Mar 10, 2023 |
---|
#21 in #preview
180KB
327 lines
query-fmt
A tool for formatting your tree-sitter queries.
✨ Features
Implemented
- Automatically format single files or directory
- Configurable with cli-flags
- Option to only preview file
📦 Installation
Download release (coming soon)
- Download query-fmt-{platform}-x86_64.zip
- Unzip it
- Run it with query-fmt
Build from source
- Install with
cargo install --git https://github.com/max397574/query-fmt.rs.git
- run with
query-fmt
Build from local directory
- 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
🚀 Usage
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
Dependencies
~6–17MB
~243K SLoC