1 unstable release
0.4.0 | Aug 29, 2024 |
---|
#205 in Text editors
145 downloads per month
Used in vim-plugin-metadata
4.5MB
151K
SLoC
tree-sitter-vim
A tree-sitter parser for Vimscript files.
References
lib.rs
:
This crate provides vim 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#"
echo "hello world" | q
"#;
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_vim::language()).expect("Error loading vim grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());
Dependencies
~2.8–4MB
~79K SLoC