Metadata-Version: 2.3
Name: vim-plugin-metadata
Version: 0.1.0
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Summary: Parse and analyze your vim plugins
Author: David Barnett
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/dbarnett/rust-vim-plugin-metadata
Project-URL: Issues, https://github.com/dbarnett/rust-vim-plugin-metadata/issues

# 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:

```rust
use vim_plugin_metadata::VimParser;

const VIMSCRIPT_CODE: &str = r#"
""
" Standalone header comment

""
" Does something cool.
func MyFunc() abort
  ...
endfunc
"#;

fn main() {
    let mut parser = VimParser::new();
    let module = parser.parse_module(VIMSCRIPT_CODE).unwrap();
    println!("{module:#?}");
}
```
```
VimModule {
    nodes: [
        StandaloneDocComment(
            "Standalone header comment",
        ),
        Function {
            name: "MyFunc",
            doc: Some(
                "Does something cool.",
            ),
        },
    ],
}
```

See tests in src/lib.rs for more usage examples.

