|
|
@ -8,7 +8,7 @@ use std::process::Stdio;
|
|
|
|
|
|
|
|
|
|
|
|
use rmpv::Value;
|
|
|
|
use rmpv::Value;
|
|
|
|
use nvim_rs::{create::tokio as create, UiAttachOptions};
|
|
|
|
use nvim_rs::{create::tokio as create, UiAttachOptions};
|
|
|
|
use tokio::runtime::Runtime;
|
|
|
|
use tokio::runtime::{Runtime};
|
|
|
|
use tokio::process::Command;
|
|
|
|
use tokio::process::Command;
|
|
|
|
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender};
|
|
|
|
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender};
|
|
|
|
use log::{info, error, trace};
|
|
|
|
use log::{info, error, trace};
|
|
|
@ -60,7 +60,7 @@ async fn drain(receiver: &mut UnboundedReceiver<UiCommand>) -> Option<Vec<UiComm
|
|
|
|
|
|
|
|
|
|
|
|
async fn start_process(mut receiver: UnboundedReceiver<UiCommand>) {
|
|
|
|
async fn start_process(mut receiver: UnboundedReceiver<UiCommand>) {
|
|
|
|
let (width, height) = INITIAL_DIMENSIONS;
|
|
|
|
let (width, height) = INITIAL_DIMENSIONS;
|
|
|
|
let (mut nvim, io_handler, _) = create::new_child_cmd(&mut create_nvim_command(), NeovimHandler::new()).await
|
|
|
|
let (mut nvim, io_handler, _) = create::new_child_cmd(&mut create_nvim_command(), NeovimHandler()).await
|
|
|
|
.unwrap_or_explained_panic("Could not locate or start the neovim process");
|
|
|
|
.unwrap_or_explained_panic("Could not locate or start the neovim process");
|
|
|
|
|
|
|
|
|
|
|
|
tokio::spawn(async move {
|
|
|
|
tokio::spawn(async move {
|
|
|
@ -126,7 +126,7 @@ async fn start_process(mut receiver: UnboundedReceiver<UiCommand>) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub struct Bridge {
|
|
|
|
pub struct Bridge {
|
|
|
|
_runtime: Runtime,
|
|
|
|
_runtime: Runtime, // Necessary to keep runtime running
|
|
|
|
sender: UnboundedSender<UiCommand>
|
|
|
|
sender: UnboundedSender<UiCommand>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|