Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scorched earth: a useless neovim plugin in rust #5

Open
boxofrox opened this issue Mar 29, 2017 · 2 comments
Open

scorched earth: a useless neovim plugin in rust #5

boxofrox opened this issue Mar 29, 2017 · 2 comments

Comments

@boxofrox
Copy link
Contributor

Here's my first completely useless neovim plugin[1] in Rust! I've been using it to test/dictate the design choices in my patches for neovim-lib. It relies on PR #4 and another yet-to-be PR currently in my fork of neovim-lib.

One thing this project brought to light is argument parsing. I wrote a couple functions to extract usize and String from neovim_lib::rpc::Value[2], and I see src/rpc/model.rs defines a couple macros along the same lines. I think it would be worthwhile for neovim_lib to expose this functionality.

Anyway, wanted to submit this for review as a working example and possible template for other plugins.

Cheers!

[1]: https://github.com/boxofrox/neovim-scorched-earth

[2]: https://github.com/boxofrox/neovim-scorched-earth/blob/master/src/args.rs

@daa84
Copy link
Owner

daa84 commented Mar 29, 2017

Hello! Thanks for your project.

About unwrap Value - i have plan to move back to rmpv library Value, Value in this library have methods for extracting simple values, for example as_u64 rmp::Value, together with From converters. Will it solve this issue?

@boxofrox
Copy link
Contributor Author

@daa84 yes, I think that will take care of parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants