1 unstable release

0.4.0 Aug 29, 2024

#188 in Text editors

Download history 619/week @ 2024-08-29 300/week @ 2024-09-05 25/week @ 2024-09-12 20/week @ 2024-09-19 19/week @ 2024-09-26 10/week @ 2024-10-03

97 downloads per month
Used in vim-plugin-metadata

MIT license

4.5MB
151K SLoC

C 148K SLoC // 0.0% comments JavaScript 2.5K SLoC // 0.0% comments Scheme 311 SLoC // 0.1% comments Rust 36 SLoC

tree-sitter-vim

CI discord matrix

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
~76K SLoC