pub fn open(cli_ctx: &context::CliContext) -> NeovimConnection {
        let (nvim_session, nvim_proc) = if let Some(nvim_listen_addr) = cli_ctx.opt.address.as_deref() {
            let session_at_addr = session_at_address(nvim_listen_addr).expect("Cannot connect to parent neovim");
            (session_at_addr, None)
        } else {
            session_with_new_neovim_process(&cli_ctx)
        };
        let mut nvim = neovim_lib::Neovim::new(nvim_session);
        let rx = notifications::subscribe(&mut nvim, &cli_ctx.page_id);
        let mut nvim_actions = NeovimActions::on(nvim);
        let initial_win_and_buf = nvim_actions.get_current_window_and_buffer();
        let initial_buf_number = nvim_actions.get_buffer_number(&initial_win_and_buf.1);
        NeovimConnection {
            nvim_proc,
            nvim_actions,
            initial_win_and_buf,
            initial_buf_number,
            rx,
        }
    }
/// Connects to parent neovim session or spawns a new neovim process and connects to it through socket.
/// Replacement for `neovim_lib::Session::new_child()`, since it uses --embed flag and steals page stdin
Connects to parent neovim session or spawns a new neovim process and connects to it through socket.
Replacement for `neovim_lib::Session::new_child()`, since it uses --embed flag and steals page stdin
Connects to parent neovim session or spawns a new neovim process and connects to it through socket . Replacement for ` neovim_lib :: Session :: new_child () ` since it uses -- embed flag and steals page stdin
pub fn open(cli_ctx: &context::CliContext) -> NeovimConnection {
        let (nvim_session, nvim_proc) = if let Some(nvim_listen_addr) = cli_ctx.opt.address.as_deref() {
            let session_at_addr = session_at_address(nvim_listen_addr).expect("Cannot connect to parent neovim");
            (session_at_addr, None)
        } else {
            session_with_new_neovim_process(&cli_ctx)
        };
        let mut nvim = neovim_lib::Neovim::new(nvim_session);
        let rx = notifications::subscribe(&mut nvim, &cli_ctx.page_id);
        let mut nvim_actions = NeovimActions::on(nvim);
        let initial_win_and_buf = nvim_actions.get_current_window_and_buffer();
        let initial_buf_number = nvim_actions.get_buffer_number(&initial_win_and_buf.1);
        NeovimConnection {
            nvim_proc,
            nvim_actions,
            initial_win_and_buf,
            initial_buf_number,
            rx,
        }
    }
pub fn open ( cli_ctx : & context :: CliContext ) -> NeovimConnection { let ( nvim_session , nvim_proc ) = if let Some ( nvim_listen_addr ) = cli_ctx . opt . address . as_deref ( ) { let session_at_addr = session_at_address ( nvim_listen_addr ) . expect ( " " ) ; ( session_at_addr , None ) } else { session_with_new_neovim_process ( & cli_ctx ) } ; let mut nvim = neovim_lib :: Neovim :: new ( nvim_session ) ; let rx = notifications :: subscribe ( & mut nvim , & cli_ctx . page_id ) ; let mut nvim_actions = NeovimActions :: on ( nvim ) ; let initial_win_and_buf = nvim_actions . get_current_window_and_buffer ( ) ; let initial_buf_number = nvim_actions . get_buffer_number ( & initial_win_and_buf . 1 ) ; NeovimConnection { nvim_proc , nvim_actions , initial_win_and_buf , initial_buf_number , rx , } }
Connects to parent neovim session or spawns a new neovim process and connects to it through socket.
Connects to parent neovim session or spawns a new neovim process and connects to it through socket .
cli_ctx
&context::CliContext
cli_ctx
&context::CliContext