From 9872e15a7f8620299b129a350d74acde9563a1c7 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Fri, 30 Oct 2020 14:05:33 +0000 Subject: [PATCH] Only load coc.nvim when compatible --- pack/acp/{start => opt}/coc.nvim/.gitignore | 0 pack/acp/{start => opt}/coc.nvim/LICENSE.md | 0 pack/acp/{start => opt}/coc.nvim/Readme.md | 0 .../{start => opt}/coc.nvim/autoload/coc.vim | 0 .../coc.nvim/autoload/coc/api.vim | 0 .../coc.nvim/autoload/coc/client.vim | 0 .../coc.nvim/autoload/coc/float.vim | 0 .../coc.nvim/autoload/coc/helper.vim | 0 .../coc.nvim/autoload/coc/list.vim | 0 .../coc.nvim/autoload/coc/rpc.vim | 0 .../coc.nvim/autoload/coc/snippet.vim | 0 .../coc.nvim/autoload/coc/task.vim | 0 .../coc.nvim/autoload/coc/terminal.vim | 0 .../coc.nvim/autoload/coc/util.vim | 0 .../coc.nvim/autoload/health/coc.vim | 0 .../{start => opt}/coc.nvim/build/index.js | 0 .../{start => opt}/coc.nvim/data/schema.json | 0 pack/acp/{start => opt}/coc.nvim/doc/coc.cnx | 0 pack/acp/{start => opt}/coc.nvim/doc/coc.txt | 0 pack/acp/{start => opt}/coc.nvim/history.md | 0 pack/acp/{start => opt}/coc.nvim/package.json | 0 .../{start => opt}/coc.nvim/plugin/coc.vim | 0 .../coc.nvim/terminateProcess.sh | 0 vimrc | 39 ++++++++++--------- 24 files changed, 20 insertions(+), 19 deletions(-) rename pack/acp/{start => opt}/coc.nvim/.gitignore (100%) rename pack/acp/{start => opt}/coc.nvim/LICENSE.md (100%) rename pack/acp/{start => opt}/coc.nvim/Readme.md (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/api.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/client.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/float.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/helper.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/list.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/rpc.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/snippet.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/task.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/terminal.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/coc/util.vim (100%) rename pack/acp/{start => opt}/coc.nvim/autoload/health/coc.vim (100%) rename pack/acp/{start => opt}/coc.nvim/build/index.js (100%) rename pack/acp/{start => opt}/coc.nvim/data/schema.json (100%) rename pack/acp/{start => opt}/coc.nvim/doc/coc.cnx (100%) rename pack/acp/{start => opt}/coc.nvim/doc/coc.txt (100%) rename pack/acp/{start => opt}/coc.nvim/history.md (100%) rename pack/acp/{start => opt}/coc.nvim/package.json (100%) rename pack/acp/{start => opt}/coc.nvim/plugin/coc.vim (100%) rename pack/acp/{start => opt}/coc.nvim/terminateProcess.sh (100%) diff --git a/pack/acp/start/coc.nvim/.gitignore b/pack/acp/opt/coc.nvim/.gitignore similarity index 100% rename from pack/acp/start/coc.nvim/.gitignore rename to pack/acp/opt/coc.nvim/.gitignore diff --git a/pack/acp/start/coc.nvim/LICENSE.md b/pack/acp/opt/coc.nvim/LICENSE.md similarity index 100% rename from pack/acp/start/coc.nvim/LICENSE.md rename to pack/acp/opt/coc.nvim/LICENSE.md diff --git a/pack/acp/start/coc.nvim/Readme.md b/pack/acp/opt/coc.nvim/Readme.md similarity index 100% rename from pack/acp/start/coc.nvim/Readme.md rename to pack/acp/opt/coc.nvim/Readme.md diff --git a/pack/acp/start/coc.nvim/autoload/coc.vim b/pack/acp/opt/coc.nvim/autoload/coc.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc.vim rename to pack/acp/opt/coc.nvim/autoload/coc.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/api.vim b/pack/acp/opt/coc.nvim/autoload/coc/api.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/api.vim rename to pack/acp/opt/coc.nvim/autoload/coc/api.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/client.vim b/pack/acp/opt/coc.nvim/autoload/coc/client.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/client.vim rename to pack/acp/opt/coc.nvim/autoload/coc/client.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/float.vim b/pack/acp/opt/coc.nvim/autoload/coc/float.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/float.vim rename to pack/acp/opt/coc.nvim/autoload/coc/float.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/helper.vim b/pack/acp/opt/coc.nvim/autoload/coc/helper.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/helper.vim rename to pack/acp/opt/coc.nvim/autoload/coc/helper.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/list.vim b/pack/acp/opt/coc.nvim/autoload/coc/list.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/list.vim rename to pack/acp/opt/coc.nvim/autoload/coc/list.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/rpc.vim b/pack/acp/opt/coc.nvim/autoload/coc/rpc.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/rpc.vim rename to pack/acp/opt/coc.nvim/autoload/coc/rpc.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/snippet.vim b/pack/acp/opt/coc.nvim/autoload/coc/snippet.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/snippet.vim rename to pack/acp/opt/coc.nvim/autoload/coc/snippet.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/task.vim b/pack/acp/opt/coc.nvim/autoload/coc/task.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/task.vim rename to pack/acp/opt/coc.nvim/autoload/coc/task.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/terminal.vim b/pack/acp/opt/coc.nvim/autoload/coc/terminal.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/terminal.vim rename to pack/acp/opt/coc.nvim/autoload/coc/terminal.vim diff --git a/pack/acp/start/coc.nvim/autoload/coc/util.vim b/pack/acp/opt/coc.nvim/autoload/coc/util.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/coc/util.vim rename to pack/acp/opt/coc.nvim/autoload/coc/util.vim diff --git a/pack/acp/start/coc.nvim/autoload/health/coc.vim b/pack/acp/opt/coc.nvim/autoload/health/coc.vim similarity index 100% rename from pack/acp/start/coc.nvim/autoload/health/coc.vim rename to pack/acp/opt/coc.nvim/autoload/health/coc.vim diff --git a/pack/acp/start/coc.nvim/build/index.js b/pack/acp/opt/coc.nvim/build/index.js similarity index 100% rename from pack/acp/start/coc.nvim/build/index.js rename to pack/acp/opt/coc.nvim/build/index.js diff --git a/pack/acp/start/coc.nvim/data/schema.json b/pack/acp/opt/coc.nvim/data/schema.json similarity index 100% rename from pack/acp/start/coc.nvim/data/schema.json rename to pack/acp/opt/coc.nvim/data/schema.json diff --git a/pack/acp/start/coc.nvim/doc/coc.cnx b/pack/acp/opt/coc.nvim/doc/coc.cnx similarity index 100% rename from pack/acp/start/coc.nvim/doc/coc.cnx rename to pack/acp/opt/coc.nvim/doc/coc.cnx diff --git a/pack/acp/start/coc.nvim/doc/coc.txt b/pack/acp/opt/coc.nvim/doc/coc.txt similarity index 100% rename from pack/acp/start/coc.nvim/doc/coc.txt rename to pack/acp/opt/coc.nvim/doc/coc.txt diff --git a/pack/acp/start/coc.nvim/history.md b/pack/acp/opt/coc.nvim/history.md similarity index 100% rename from pack/acp/start/coc.nvim/history.md rename to pack/acp/opt/coc.nvim/history.md diff --git a/pack/acp/start/coc.nvim/package.json b/pack/acp/opt/coc.nvim/package.json similarity index 100% rename from pack/acp/start/coc.nvim/package.json rename to pack/acp/opt/coc.nvim/package.json diff --git a/pack/acp/start/coc.nvim/plugin/coc.vim b/pack/acp/opt/coc.nvim/plugin/coc.vim similarity index 100% rename from pack/acp/start/coc.nvim/plugin/coc.vim rename to pack/acp/opt/coc.nvim/plugin/coc.vim diff --git a/pack/acp/start/coc.nvim/terminateProcess.sh b/pack/acp/opt/coc.nvim/terminateProcess.sh similarity index 100% rename from pack/acp/start/coc.nvim/terminateProcess.sh rename to pack/acp/opt/coc.nvim/terminateProcess.sh diff --git a/vimrc b/vimrc index 8b69e98..9d7f00f 100644 --- a/vimrc +++ b/vimrc @@ -47,7 +47,6 @@ set autoindent set autoread set background=dark set backspace=indent,eol,start -set cmdheight=2 set colorcolumn=101 set directory=$TEMP//,/tmp//,. set display+=lastline @@ -118,24 +117,6 @@ if has("eval") set t_Co=16 endif colorscheme PaperColor - - " Use tab for trigger completion with characters ahead and navigate. - " NOTE: Use command ':verbose imap ' to make sure tab is not mapped by - " other plugin before putting this into your config. - inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() - inoremap pumvisible() ? "\" : "\" - - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - - inoremap pumvisible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" - endif "============================================================================= @@ -180,6 +161,26 @@ else set signcolumn=yes endif +if has("patch-8.1.1719") && executable("nodejs") + packadd coc.nvim + " Use tab for trigger completion with characters ahead and navigate. + " NOTE: Use command ':verbose imap ' to make sure tab is not mapped by + " other plugin before putting this into your config. + inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() + inoremap pumvisible() ? "\" : "\" + + function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' + endfunction + + inoremap pumvisible() ? coc#_select_confirm() + \: "\u\\=coc#on_enter()\" +endif + if has("printer") set printheader=%t%h%m%=Page\ %N set printoptions=paper:A4,number:y,syntax:n