guile-schemefmt

guile-schemefmt is a Scheme source formatter for the Guile ecosystem. It reads Scheme source on stdin or from files and writes a re-indented version, matching Emacs scheme-mode's indent-region output column-for-column on realistic code — including comment alignment, quasiquote and keyword reader-prefix handling, and scheme-indent-function customisation via .lispwords files.

The algorithm is a direct port of Emacs 30.2's scheme.el and lisp-mode.el. Every fixture is cross-verified against real Emacs, so drift from Emacs' behaviour fails the test suite.

Features include a filter/file-argument CLI, in-place rewriting (-w), unified-diff preview (-d, usable as a CI gate), per-project .lispwords overrides, and a library API callable from the Guile REPL.

Requirements

Installation

Via Guix from a source checkout:

guix install -f guix.scm

Or build with autotools:

./bootstrap
./configure
make
sudo make install

License

GPL-3.0-or-later

Git Repository

guile-schemefmt is developed using the Git version control system. The official repository is hosted at https://git.sr.ht/~campbellr/guile-schemefmt.

To clone the repository, run:

git clone https://git.sr.ht/~campbellr/guile-schemefmt

For full details, see the README at https://git.sr.ht/~campbellr/guile-schemefmt.

Contributing

Patches and bug reports welcome — see the repository for details.