4fb319329e36c1aed7af67990089cabe14d24df8

Author
Pavle Portic <git@theedgeofrage.com>
Committer
Pavle Portic <git@theedgeofrage.com>
Date

Message

Add new CoC mappings to spacevim config

Diff

 1diff --git a/dot_spacevim b/dot_spacevim
 2index 0c83d8344126760cc6592c799872df2b8c766dd6..85fa97315f48be46f73695692d0b1ab7ed0bbd5a 100644
 3--- a/dot_spacevim
 4+++ b/dot_spacevim
 5@@ -177,6 +177,18 @@ function! UserConfig()
 6 	" Undotree maps
 7 	nnoremap <F3> :UndotreeToggle<cr>
 8 
 9+	" CoC mapping
10+	" inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
11+	inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
12+	inoremap <silent><expr> <C-x><C-z> coc#pum#visible() ? coc#pum#stop() : "\<C-x>\<C-z>"
13+	" remap for complete to use tab and <cr>
14+	inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#next(1) : <SID>check_back_space() ? "\<Tab>" : coc#refresh()
15+	inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
16+	inoremap <silent><expr> <c-space> coc#refresh()
17+
18+	hi CocSearch ctermfg=12 guifg=#18A3FF
19+	hi CocMenuSel ctermbg=109 guibg=#13354A
20+
21 	""""""""""""""""""""""
22 	" Plugin configuration
23 	""""""""""""""""""""""