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
131 downloads per month
640KB
26K
SLoC
tree-sitter-rigz
Setup for Neovim
- 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',
},
}
- 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