VS Code extension providing language support for GABC/NABC notation used in Gregorian chant composition.
- Semantic highlighting: Parser-based, context-aware syntax highlighting
- TextMate grammar: Fast, regex-based baseline highlighting
- Complete GABC notation support: pitches, neumes, modifiers, clefs, bars, spacing
- NABC support: pipe-separated alternations
- Header syntax with proper highlighting
- Syllable styling: bold, italic, underline, small caps, teletype, colored text
- Attributes: shape, stroke, custos, choral signs, braces, slurs, episema
- Customizable token colors for different note types and elements
- Bundled LSP server: No external dependencies required
- Real-time validation via gregorio-lsp
- Error detection for missing headers, NABC mismatches, invalid constructions
- Diagnostic reporting with precise locations
- Robust TypeScript-based parser (tree-sitter disabled to avoid native module issues)
- Configurable GABC code linting
- Real-time or on-save diagnostics
- Severity level filtering (error, warning, info)
- Rule-based filtering to ignore specific diagnostics
- Quick toggle command for enabling/disabling linting
- Restart Gregorio Language Server
- Toggle Linting
- Toggle Semantic Highlighting
None! The extension comes with a bundled LSP server that works out of the box.
If you want to use a custom or development version of gregorio-lsp, you can configure the path:
- Set
gregorio.lsp.serverPathin your settings to point to your custom server.js - The extension will use your custom server instead of the bundled one
The extension automatically searches for external LSP servers in:
gregorio.lsp.serverPathsetting (if configured)- Bundled server (shipped with extension) - default
../gregorio-lsp/dist/server.js(sibling folder, for development)./gregorio-lsp/dist/server.js(workspace subfolder)
gregorio.lsp.serverPath: Custom path to gregorio-lsp server.jsgregorio.lsp.trace.server: LSP communication tracing
gregorio.linting.enabled: Enable/disable linting (default:true)gregorio.linting.severity: Minimum severity to report:error,warning, orinfo(default:warning)gregorio.linting.onSave: Only lint when saving files (default:false)gregorio.linting.ignoreRules: Array of rule codes to ignore (default:[])
gregorio.highlighting.semantic: Enable semantic syntax highlighting (default:true)
See LINTING.md for detailed linting documentation. See SEMANTIC_HIGHLIGHTING.md for semantic highlighting details.
- Install the extension
- Ensure gregorio-lsp is built
- Open a `.gabc` file
- Automatic activation, highlighting, and diagnostics
The LSP validation for balanced pitch descriptors in fused NABC glyphs may produce false positive warnings when a NABC snippet contains multiple complex neume descriptors separated by spaces. This is a known limitation in the gregorio-lsp validation rules. See the gregorio-lsp documentation for details and workarounds.
Initial release with GABC/NABC syntax highlighting, LSP integration, and real-time diagnostics.
MIT License