Add neovim (#45)

I am using the "app_dirs" crate to discover `~/.config` on Unix and `%APPDATA%/` on Windows.
This commit is contained in:
Thomas Versteeg
2018-07-04 09:51:19 +02:00
committed by Roey Darwish Dror
parent 35dbab8beb
commit 758d835b7e
5 changed files with 75 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ extern crate log;
extern crate env_logger;
extern crate term_size;
extern crate termcolor;
extern crate app_dirs;
#[cfg(target_os = "linux")]
mod linux;
@@ -193,6 +194,16 @@ fn run() -> Result<(), Error> {
}
}
if let Some(nvim) = utils::which("nvim") {
if let Some(nvimrc) = vim::nvimrc() {
if let Some(plugin_framework) = vim::PluginFramework::detect(&nvimrc) {
terminal.print_separator(&format!("neovim ({:?})", plugin_framework));
run_vim(&nvim, &nvimrc, plugin_framework.upgrade_command())
.report("neovim", &mut reports);
}
}
}
if let Some(npm) = utils::which("npm").map(npm::NPM::new) {
if let Ok(npm_root) = npm.root() {
if is_ancestor(&home_dir().unwrap(), &npm_root) {