Tree sitter implementation for SRF format
Find a file
2026-04-10 15:01:25 -07:00
queries initial commit - all ai generated 2026-04-10 15:01:25 -07:00
src initial commit - all ai generated 2026-04-10 15:01:25 -07:00
test/corpus initial commit - all ai generated 2026-04-10 15:01:25 -07:00
.gitignore initial commit - all ai generated 2026-04-10 15:01:25 -07:00
.mise.toml initial commit - all ai generated 2026-04-10 15:01:25 -07:00
.pre-commit-config.yaml initial commit - all ai generated 2026-04-10 15:01:25 -07:00
grammar.js initial commit - all ai generated 2026-04-10 15:01:25 -07:00
LICENSE initial commit - all ai generated 2026-04-10 15:01:25 -07:00
package.json initial commit - all ai generated 2026-04-10 15:01:25 -07:00
README.md initial commit - all ai generated 2026-04-10 15:01:25 -07:00
tree-sitter.json initial commit - all ai generated 2026-04-10 15:01:25 -07:00

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