1 unstable release

0.4.0 Aug 29, 2024

#205 in Text editors

Download history 394/week @ 2024-08-25 322/week @ 2024-09-01 212/week @ 2024-09-08 21/week @ 2024-09-15 21/week @ 2024-09-22 21/week @ 2024-09-29 2/week @ 2024-10-06 141/week @ 2024-10-13 1/week @ 2024-10-20

145 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
~79K SLoC