Supported Languages
Language Support
Section titled “Language Support”| Language | Identifier(s) | Parser | Strategy |
|---|---|---|---|
| Go | go, golang |
Built-in Go parser | 6-strategy progressive |
| TypeScript | typescript, ts |
Tree-sitter | Syntax validation |
| TSX | tsx |
Tree-sitter | Syntax validation |
| Rust | rust, rs |
Tree-sitter | Syntax validation |
| Nix | nix |
Tree-sitter | Syntax validation |
| HCL/Terraform | hcl, terraform, tf |
Tree-sitter | Syntax validation |
| Templ | templ |
Tree-sitter | Syntax validation |
All parsers are embedded in the binary. No external tools, CLIs, or CGO required.
Selecting Languages
Section titled “Selecting Languages”Use the -l (or --language) flag:
# Single languagemd-go-validator -l go .
# Multiple languagesmd-go-validator -l go,typescript,rust .
# All supported languagesmd-go-validator -l go,templ,typescript,nix,rust,hcl .
# Short formsmd-go-validator -l go,ts,rs,tf .List Available Languages
Section titled “List Available Languages”md-go-validator --list-languagesTree-Sitter Integration
Section titled “Tree-Sitter Integration”Non-Go languages use gotreesitter, a pure-Go tree-sitter binding. The grammars are compiled into the binary at build time, so there are zero runtime dependencies.
Adding New Languages
Section titled “Adding New Languages”The validator uses a pluggable registry. See the Library API guide for how to implement and register a custom validator.
See Also
Section titled “See Also”- Go Parsing Strategies for the 6-strategy deep dive
- CLI Options for language selection flags