@ -21,7 +21,6 @@ use crate::settings::*;
use crate ::{ cmd_line ::CmdLineSettings , error_handling ::ResultPanicExplanation } ;
use crate ::{ cmd_line ::CmdLineSettings , error_handling ::ResultPanicExplanation } ;
pub use events ::* ;
pub use events ::* ;
use handler ::NeovimHandler ;
use handler ::NeovimHandler ;
use regex ::Regex ;
pub use tx_wrapper ::{ TxWrapper , WrapTx } ;
pub use tx_wrapper ::{ TxWrapper , WrapTx } ;
pub use ui_commands ::UiCommand ;
pub use ui_commands ::UiCommand ;
@ -188,16 +187,13 @@ async fn start_neovim_runtime(
close_watcher_running . store ( false , Ordering ::Relaxed ) ;
close_watcher_running . store ( false , Ordering ::Relaxed ) ;
} ) ;
} ) ;
if let Ok ( output ) = nvim . command_output ( "version" ) . await {
match nvim . command_output ( "echo has('nvim-0.4')" ) . await . as_deref ( ) {
let re = Regex ::new ( r"NVIM v0.[4-9]\d*.\d+" ) . unwrap ( ) ;
Ok ( "1" ) = > { } // This is just a guard
if ! re . is_match ( & output ) {
_ = > {
error ! ( "Neovide requires nvim version 0.4 or higher. Download the latest version here https://github.com/neovim/neovim/wiki/Installing-Neovim" ) ;
error ! ( "Neovide requires nvim version 0.4 or higher. Download the latest version here https://github.com/neovim/neovim/wiki/Installing-Neovim" ) ;
std ::process ::exit ( 0 ) ;
std ::process ::exit ( 0 ) ;
}
}
} else {
}
error ! ( "Neovide requires nvim version 0.4 or higher. Download the latest version here https://github.com/neovim/neovim/wiki/Installing-Neovim" ) ;
std ::process ::exit ( 0 ) ;
} ;
nvim . set_var ( "neovide" , Value ::Boolean ( true ) )
nvim . set_var ( "neovide" , Value ::Boolean ( true ) )
. await
. await