Tree sitter implementation for SRF format
Find a file
2026-04-10 16:00:26 -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 update readme with proper install instructions 2026-04-10 16:00:26 -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

Add to your Neovim config:

vim.filetype.add({
  extension = {
    srf = "srf",
  },
})

vim.api.nvim_create_autocmd("User", {
  pattern = "TSUpdate",
  callback = function()
    require("nvim-treesitter.parsers").srf = {
      install_info = {
        url = "https://github.com/elerch/srf-tree-sitter",
        branch = "master",
        queries = "queries",
      },
    }
    vim.treesitter.language.register("srf", "srf")
  end,
})

vim.api.nvim_create_autocmd("FileType", {
  pattern = "srf",
  callback = function(args)
    pcall(vim.treesitter.start, args.buf)
  end,
})

Then install the parser:

:TSInstall srf