Repository navigation
v0.9.0
Pre-release
Pre-release
Added
grefmtCLI formatter (src/bin/grefmt.rs): a new standalone binary that
formats GABC source files.-w/--width <n>: maximum output line width (default: 80). The formatter
re-flows the notation body so that no source line exceeds this limit; existing
inter-syllable whitespace (including newlines) is replaced by the packer's
output. Content inside parentheses is never modified.--break-after-clef: inserts a blank line after each clef token (e.g.(c4)).--break-after-bar: inserts a blank line after each bar token (,,;,:,
::, etc.).-c/--check: exits with code 1 if any file would change without writing
anything; useful for CI checks.-i/--in-place: writes formatted output back to each file.- Reads from stdin / writes to stdout when no files are given.
src/formatlibrary module:format_gabc_text(text, &FormatOptions) -> String
is the public entry point used by bothgrefmtand the LSP server. The header
section (before%%) is preserved verbatim except for trailing whitespace per line.- LSP
textDocument/formatting: thegregorio-lspserver now advertises and
handles thetextDocument/formattingcapability. Editors that support
format-on-save (Helix, Neovim, VS Code, etc.) will call this handler, which
returns a singleTextEditreplacing the whole document with the formatted text. - Formatter configuration in
workspace/didChangeConfigurationunder the
"formatting"key:maxLineWidth(integer),breakAfterClef(bool),
breakAfterBar(bool). SeeCONFIG.mdfor the full schema.
Full changelog: https://github.com/AISCGre-BR/gregorio-lsp/blob/main/CHANGELOG.md