nvim_rs/lib.rs
1//! # Rust library for Neovim clients
2//!
3//! Implements support for rust plugins for
4//! [Neovim](https://github.com/neovim/neovim) through its msgpack-rpc API.
5//!
6//! ### Origins
7//!
8//! This library started as a fork of
9//! [neovim-lib](https://github.com/daa84/neovim-lib) with the goal to utilize
10//! Rust's `async/await` to allow requests/notification to/from neovim to be
11//! arbitrarily nested. After the fork, I started implementing more ideas I had
12//! for this library.
13//!
14//! ### Status
15//!
16//! As of the end of 2019, I'm somewhat confident to recommend starting to use
17//! this library. The overall handling should not change anymore. A breaking
18//! change I kind of expect is adding error variants to
19//! [`CallError`](crate::error::CallError) when I start working on the API
20//! (right now, it panics when messages don't have the right format, I'll want
21//! to return proper errors in that case).
22//!
23//! I've not yet worked through the details of what-to-export, but I'm quite
24//! willing to consider what people need or want.
25#![cfg_attr(docsrs, feature(doc_auto_cfg))]
26extern crate rmp;
27extern crate rmpv;
28#[macro_use]
29extern crate log;
30
31pub mod rpc;
32#[macro_use]
33pub mod neovim;
34pub mod error;
35pub mod examples;
36pub mod exttypes;
37pub mod neovim_api;
38pub mod neovim_api_manual;
39pub mod uioptions;
40
41pub mod create;
42
43pub use crate::{
44 exttypes::{Buffer, Tabpage, Window},
45 neovim::Neovim,
46 rpc::handler::Handler,
47 uioptions::{UiAttachOptions, UiOption},
48};
49
50#[cfg(feature = "use_tokio")]
51pub mod compat {
52 //! A re-export of tokio-util's [`Compat`](tokio_util::compat::Compat)
53 pub mod tokio {
54 pub use tokio_util::compat::Compat;
55 }
56}
57
58pub use rmpv::Value;