nvim-rs icon indicating copy to clipboard operation
nvim-rs copied to clipboard

Roadmap

Open KillTheMule opened this issue 6 years ago • 2 comments

  • [x] Figure out how plugins can quit

    • https://github.com/KillTheMule/nvim-rs/issues/2
  • [ ] 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
    • https://github.com/KillTheMule/nvim-rs/issues/8
  • [x] Consider making a difference between requests and notifications, and send out notifications with the proper message type, and don't wait for a response

    • Does neovim actually recognize this? Read the docs! Maybe everything's a requests anyways, then don't bother
      • It does, see https://neovim.io/doc/user/api.html#api-global-events. Maybe not so usefull since there seems little to do where you don't want direct error feedback
    • https://github.com/KillTheMule/nvim-rs/issues/7
  • [x] Figure out what to do if the handler needs some cleanup logic

    • https://github.com/KillTheMule/nvim-rs/issues/3
  • [x] Consider error handling

    • Maybe get away from Box<dyn Error> in favor of a small enum?
    • https://github.com/KillTheMule/nvim-rs/issues/6
  • [x] Can we merge Requester into Neovim? Could avoid doubling the API

  • [ ] Need more tests

    • [ ] Test all connection types on all OSes
    • [ ] Test exttypes
    • [ ] Check https://docs.rs/loom/0.2.14/loom/
  • [ ] 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

    • https://github.com/KillTheMule/nvim-rs/issues/9
  • [ ] Document stuff

    • [x] 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?

KillTheMule avatar Dec 12 '19 13:12 KillTheMule

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

unrealhoang avatar Dec 30 '19 06:12 unrealhoang

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

KillTheMule avatar Dec 30 '19 09:12 KillTheMule