Tree sitter implementation for SRF format
| queries | ||
| src | ||
| test/corpus | ||
| .gitignore | ||
| .mise.toml | ||
| .pre-commit-config.yaml | ||
| grammar.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tree-sitter.json | ||
srf-tree-sitter
Tree-sitter grammar for SRF (Simple Record Format).
Setup
mise install
npm install
Build & Test
mise exec -- tree-sitter generate
mise exec -- tree-sitter test
Neovim Integration
Register the parser and configure highlighting in your Neovim config:
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.srf = {
install_info = {
url = "https://git.lerch.org/lobo/srf-tree-sitter.git",
files = { "src/parser.c" },
branch = "main",
},
filetype = "srf",
}
vim.filetype.add({
extension = {
srf = "srf",
},
})
Then install the parser:
:TSInstall srf
Copy queries/highlights.scm to your Neovim runtime queries directory:
mkdir -p ~/.config/nvim/queries/srf
cp queries/highlights.scm ~/.config/nvim/queries/srf/highlights.scm