From 78b781b8597e3a7126215b964c4466674c02bd53 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 13 Jun 2018 13:19:22 -0700 Subject: [PATCH] Oni support --- vim/init.vim | 8 ++++---- vim/rc/plugins.rc.vim | 24 ++++++++++++++++-------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/vim/init.vim b/vim/init.vim index b0a04ad..456cd55 100644 --- a/vim/init.vim +++ b/vim/init.vim @@ -43,14 +43,14 @@ endfunction function! IsGuiApp() return has("gui_running") || exists("neovim_dot_app") \ || has("gui_win32") || has("gui_macvim") - \ || has("gui_vimr") + \ || has("gui_vimr") || exists('g:gui_oni') endfunction " Auto install vim-plug if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall + silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall endif call s:smart_source_rc('init') diff --git a/vim/rc/plugins.rc.vim b/vim/rc/plugins.rc.vim index 4c3985a..a73962a 100644 --- a/vim/rc/plugins.rc.vim +++ b/vim/rc/plugins.rc.vim @@ -23,16 +23,20 @@ call s:smart_source_rc('plugins/gitgutter') " }} Git " Searching {{ -if !executable('fzf') - call s:smart_source_rc('plugins/ctrlp') +if !exists('g:gui_oni') + if !executable('fzf') + call s:smart_source_rc('plugins/ctrlp') + endif + call s:smart_source_rc('plugins/fzf') + call s:smart_source_rc('plugins/vim-grepper') endif -call s:smart_source_rc('plugins/fzf') -call s:smart_source_rc('plugins/vim-grepper') " }} Searching " Autocomplete {{ call s:smart_source_rc('plugins/omnicompletion') -if has('nvim') && has('python3') +if exists('g:gui_oni') + " We'll keep Oni's autocomplete with Language Server +elseif has('nvim') && has('python3') call s:smart_source_rc('plugins/deoplete') elseif (has('lua') && (v:version > 703 || v:version == 703 && has('patch885'))) call s:smart_source_rc('plugins/neocomplete') @@ -45,7 +49,7 @@ end Plug 'tpope/vim-surround' call s:smart_source_rc('plugins/tagbar') call s:smart_source_rc('plugins/tcomment_vim') -if (v:version > 703) +if (v:version > 703) && !exists('g:gui_oni') Plug 'ludovicchabant/vim-gutentags' " Auto generate tags files end if has('nvim') @@ -63,9 +67,13 @@ endif " GUI {{ Plug 'gregsexton/MatchTag' -call s:smart_source_rc('plugins/airline') +if !exists('g:gui_oni') + call s:smart_source_rc('plugins/airline') +endif call s:smart_source_rc('plugins/dash') -call s:smart_source_rc('plugins/startify') +if !exists('g:gui_oni') + call s:smart_source_rc('plugins/startify') +endif " Plug 'edkolev/tmuxline.vim' " Removed because this can fail on some machines " let g:tmuxline_powerline_separators = 0