Rust vim-plugin-metadata
Parse and analyze your vim plugins, from Rust!
WARNING: This library is early alpha, still missing tons of functionality, and probably has serious bugs. Use at your own risk.
Usage
cargo add
it to your project, point it at a file, get metadata:
use VimParser;
const VIMSCRIPT_CODE: &str = r#"
""
" Standalone header comment
""
" Does something cool.
func MyFunc() abort
...
endfunc
"#;
VimModule {
nodes: [
StandaloneDocComment(
"Standalone header comment",
),
Function {
name: "MyFunc",
doc: Some(
"Does something cool.",
),
},
],
}
See tests in src/lib.rs for more usage examples.