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

Roadmap #1

Open
6 of 17 tasks
KillTheMule opened this issue Dec 12, 2019 · 2 comments
Open
6 of 17 tasks

Roadmap #1

KillTheMule opened this issue Dec 12, 2019 · 2 comments

Comments

@KillTheMule
Copy link
Owner

KillTheMule commented Dec 12, 2019

  • Figure out how plugins can quit

  • Rewrite the API to be type save, and hide rmpv::Value from the user

    • Can probably be done for outgoing requests by recursively creating values
      • Fixed args are easy, but something like nvim_call_function probably needs going through a trait
    • Incoming Responses can be done like fixed args
    • Incoming Notifications/Requests might be impossible.
      • Check out rmp-serde or so, so maybe the user has to just declare a struct
    • Strongly typed API #8
  • Consider making a difference between requests and notifications, and send out notifications with the proper message type, and don't wait for a response

  • Figure out what to do if the handler needs some cleanup logic

  • Consider error handling

  • Can we merge Requester into Neovim? Could avoid doubling the API

  • Need more tests

  • We need Tokio right now. What can we do to stay "as generic as possible", so we can move to other executors when the possibility arrives?

    • Use stuff from futures as far as possible.
    • See what we really need to expose from crate::runtime
  • Consider public API.

    • Right now, everything's just the way it would compile
  • Check rust's API guidelines

  • Document stuff

    • Document the library
      • I consider this done initially, from now on everything new should be directly documented, and we should be fine.
    • More examples
  • Consider logging

    • Maybe tokio's tracing is an idea?
@unrealhoang
Copy link

unrealhoang commented Dec 30, 2019

First, thank you for your effort of creating this project. I've also been discovering neovim rpc in Rust and neovim-lib was not satisfying enough.

For

Rewrite the API to be type save, and hide rmpv::Value from the user

You can rely on rmpv::Value with serde feature and deserialize Value (or ValueRef) into user-defined struct. Your lib could also pre-define popular structs as well. Here is an example of me using in my project:
https://github.com/unrealhoang/lspc/blob/master/src/neovim.rs#L301-L312

@KillTheMule
Copy link
Owner Author

Ahh very cool, I was hoping for something like this. Seems like it's an achievable goal to hide Value from the user :) Thanks!

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