3 unstable releases

0.1.1 Sep 6, 2024
0.1.0 Aug 13, 2024
0.0.1 May 14, 2024

#159 in Text editors

Download history 6/week @ 2024-07-27 110/week @ 2024-08-10 12/week @ 2024-08-17 73/week @ 2024-08-31 39/week @ 2024-09-07 19/week @ 2024-09-14

131 downloads per month

MIT license

640KB
26K SLoC

C 26K SLoC JavaScript 130 SLoC // 0.0% comments Rust 29 SLoC // 0.3% comments Scheme 10 SLoC

tree-sitter-rigz

Setup for Neovim

  1. Add the following to init.lua
vim.filetype.add({
  extension = {
    rigz = "rigz",
  },
})

local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.rigz = {
  install_info = {
    url = "~/parsers/tree-sitter-rigz", -- local path or git repo
    files = {"src/parser.c"},
    generate_requires_npm = false, -- if stand-alone parser without npm dependencies
    requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
    branch = "main", -- default branch is not master
    filetype = 'rigz',
  },
}
  1. curl "https://gitlab.com/magicfoodhand/tree-sitter-rigz/-/raw/main/queries/highlights.scm?ref_type=heads" -o ~/.local/share/nvim/lazy/nvim-treesitter/queries/rigz/highlights.scm

lib.rs:

This crate provides Rigz language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = r#"
puts "hello world"
"#;
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_rigz::language()).expect("Error loading Rigz grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~2.7–4MB
~72K SLoC