From 3868ac3403accbad6ea0b46a283737155248347f Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Tue, 26 Jul 2022 03:14:28 -0400 Subject: [PATCH] make it more robust --- .vimrc.bundles | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.vimrc.bundles b/.vimrc.bundles index 58b2e26..4c51fbb 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -27,7 +27,11 @@ call plug#begin(plugin_dir) - Plug 'neoclide/coc.nvim', {'branch': 'release'} + " make sure to install nodejs to use coc.nvim + if executable('node') + Plug 'neoclide/coc.nvim', {'branch': 'release'} + endif + Plug 'rust-lang/rust.vim' Plug 'leafgarland/typescript-vim' @@ -161,6 +165,7 @@ " } " neoclide/coc.nvim { + if isdirectory(expand(plugin_dir . "/coc.nvim/")) && executable('node') " add desired extensions to the following global variable " coc-tsserver: javascript " coc-pyright: python @@ -170,6 +175,7 @@ if filereadable(expand(config_dir . "/.exp-coc-config")) exec "source " . config_dir . "/.exp-coc-config" endif + endif " } " }