8 releases

0.3.0 Mar 13, 2023
0.2.1 Jan 23, 2023
0.1.5 Jul 18, 2022

#41 in #format-file

Download history 15/week @ 2024-07-20 27/week @ 2024-07-27 9/week @ 2024-08-03 4/week @ 2024-08-10 4/week @ 2024-09-07 13/week @ 2024-09-14 46/week @ 2024-09-21 19/week @ 2024-09-28 29/week @ 2024-10-05 40/week @ 2024-10-12 17/week @ 2024-10-19 18/week @ 2024-10-26 15/week @ 2024-11-02

91 downloads per month

MIT license

27KB
713 lines

Gelatyx

Format code blocks inside documentation files.

Build status Sponsor me

demo


Features

  • Format language code blocks inside documentation files.
  • Check mode. Ask Gelatyx if the documentation has been formatted.
  • Glob support.
  • Configure the formatter via a configuration file.
  • Fancy error message and colorful output.
  • Cross-platform and single binary.
  • Supported languages

Usage

$ gelatyx --language lua input.md                                 Format a file with lua formatter
$ gelatyx --language lua *.md                                     Format multiple files ...
$ gelatyx --language lua input.md --check                         Check if the docs has been formatted.
$ gelatyx --language lua input.md --language-config config.toml   Configure the formatter.

Integration with other formatter

If you like gelatyx to support your favorite formatter, feel free to open new issue.

Installation

From binaries

The release page includes pre-compiled binaries for GNU/Linux, macOS, and Windows.

From source

Using cargo-binstall

$ cargo binstall gelatyx

Using Rust's package manager cargo:

$ cargo install gelatyx

Development

git clone https://github.com/azzamsa/gelatyx

# Build
cd gelatyx
cargo build

# Run unit tests and integration tests
cargo test

# Install
cargo install --path .

Contributing

To learn more read the development guide

Origin of the name

The name Gelatyx is a played version of Gelatik. A beautiful bird from Indonesia.

Credits

Dependencies

~14–24MB
~329K SLoC