Parse and analyze your vim plugins, from Rust or Python!
WARNING: This library is early alpha, still missing tons of functionality, and probably has serious bugs. Use at your own risk.
Install in Rust or in Python, point it at a plugin directory, get metadata.
Rust:
use vim_plugin_metadata::VimParser;
fn main() {
let mut parser = VimParser::new().unwrap();
let plugin = parser.parse_plugin_dir(".vim/plugged/someplugin").unwrap();
println!("{plugin:#?}");
}
VimPlugin {
content: [
VimModule {
path: Some("plugin/somefile.vim"),
doc: Some("File header comment"),
nodes: [ … ],
},
],
…
}
Python:
import vim_plugin_metadata
vim_plugin_metadata.VimParser().parse_plugin_dir(".vim/plugged/someplugin")
VimPlugin([VimModule("plugin/somefile.vim", doc="File header comment", nodes=[…]), …])