73b3e5025d8077bc63fa396be0bce8b2f7787e8a
- Author
- Pavle Portic <git@theedgeofrage.com>
- Committer
- Pavle Portic <git@theedgeofrage.com>
- Date
Message
Add copilot to nvim and add more coc keybindings
Diff
1diff --git a/dot_spacevim b/dot_spacevim
2index f849b70a64428519eabc82132cfd5821aa123d19..b703cedca7318e3b3624cb2ac25043f86d1768ac 100644
3--- a/dot_spacevim
4+++ b/dot_spacevim
5@@ -39,6 +39,7 @@ function! UserInit()
6 Plug 'mbbill/undotree'
7 Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install', 'for': ['markdown', 'vim-plug'] }
8 Plug 'mboughaba/i3config.vim'
9+ Plug 'github/copilot.vim'
10
11 endfunction
12
13@@ -176,12 +177,17 @@ function! UserConfig()
14 " Undotree maps
15 nnoremap <F3> :UndotreeToggle<cr>
16
17+ " LSP mappings
18+ nnoremap gr :call spacevim#lang#util#FindReferences()<CR>
19+ nnoremap gi :call spacevim#lang#util#Implementation()<CR>
20+ nnoremap E :call spacevim#plug#coc#show_documentation()<CR>
21+
22 " CoC mapping
23 " inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
24 inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
25 inoremap <silent><expr> <C-x><C-z> coc#pum#visible() ? coc#pum#stop() : "\<C-x>\<C-z>"
26 " remap for complete to use tab and <cr>
27- inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#next(1) : <SID>check_back_space() ? "\<Tab>" : coc#refresh()
28+ inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
29 inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
30 inoremap <silent><expr> <c-space> coc#refresh()
31