nui 0.0.1

Experimental neovim RPC for UI clients
Documentation
use crate::{msgpack::Message, Neovim};
use rmpv::Value;

pub struct Command {
    // Command name
    cmd: String,
    // Command range
    range: Option<(usize, usize)>,
    // Command count Optional
    count: Option<usize>,
    // optional
    reg: Option<String>,
    // required
    bang: bool,
    // required
    args: Vec<String>,
    // required?
    addr: Option<String>,
    // nargs required?
    nargs: Option<String>,
    // nextcmd required?
    nextcmd: Option<String>,
    // magic required?
    magic: Option<Vec<(String, bool)>>,
    // required
    mods: Option<Vec<()>>,
}

impl Command {
    pub fn new(cmd: impl Into<String>) -> Self {
        Self {
            cmd: cmd.into(),
            range: None,
            count: None,
            reg: None,
            bang: false,
            args: Vec::new(),
            addr: None,
            nargs: None,
            nextcmd: None,
            magic: None,
            mods: None,
        }
    }

    pub fn arg(&mut self, arg: impl Into<String>) -> &mut Self {
        self
    }

    pub fn bang(&mut self, enabled: bool) -> &mut Self {
        self
    }
}

impl Neovim {
    pub async fn perform(&self) {}
}