5 releases (3 breaking)
0.3.0 | Oct 29, 2024 |
---|---|
0.2.0 | Oct 25, 2024 |
0.1.1 | Sep 6, 2024 |
0.1.0 | Aug 13, 2024 |
0.0.1 | May 14, 2024 |
#293 in Parser tooling
281 downloads per month
Used in rigz
530KB
18K
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
Rust Derive Macro Highlighting
(macro_invocation
(scoped_identifier
name: (identifier) @name (#eq? @name derive_module!))
(token_tree (raw_string_literal) @rigz_string)
)
(macro_invocation
(scoped_identifier
path: (identifier) @path (#eq? @path rigz_ast_derive)
name: (identifier) @name (#eq? @name derive_module!))
(token_tree (raw_string_literal) @rigz_string)
)
Dependencies
~2–285KB