blob: d92073ba151cf5b3333f71a7b0749ed7c9916a88 [file] [log] [blame]
Skyler Greya7feb6e2022-08-26 06:51:55 +01001nmap <silent> ]c :call CocAction('diagnosticNext')<cr>
2nmap <silent> [c :call CocAction('diagnosticPrevious')<cr>
3nmap <silent> <Leader>fs <Plug>(coc-codeaction-selected)
Skyler Grey97efa1a2022-10-30 23:10:37 +00004nmap <silent> <Leader>fb <Plug>(coc-codeaction)
5nmap <silent> <Leader>ff <Plug>(coc-codeaction-cursor)
6nmap <silent> <Leader>fc <Plug>(coc-codeaction-cursor)
7nmap <silent> <Leader>fr <Plug>(coc-rename)
8nmap <silent> <Leader>fi <Plug>(coc-fix-current)
Skyler Greya7feb6e2022-08-26 06:51:55 +01009nmap <Leader>fe <Cmd>CocCommand explorer<CR>
10
Skyler Greyf066b512022-10-31 00:02:48 +000011let g:UltiSnipsExpandTrigger="<NUL>"
12let g:UltiSnipsJumpForwardTrigger="<NUL>"
13let g:UltiSnipsJumpBackwardTrigger="<NUL>"
14inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
15inoremap <silent><expr> <Tab> coc#pum#visible() ? coc#pum#next(0) : UltiSnips#CanJumpForwards() ? "<C-R>=UltiSnips#JumpForwards()<cr>" : "\<Tab>"
16inoremap <silent><expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(0) : UltiSnips#CanJumpBackwards() ? "<C-R>=UltiSnips#JumpBackwards()<cr>" : "\<S-Tab>"
17xnoremap <silent> <Tab> :call UltiSnips#SaveLastVisualSelection()<cr>gvs
18
19
20snoremap <nowait><silent> <Tab> <Esc>:call UltiSnips#JumpForwards()<cr>
21snoremap <nowait><silent> <S-Tab> <Esc>:call UltiSnips#JumpForwards()<cr>
22
23
Skyler Greya7feb6e2022-08-26 06:51:55 +010024function! s:show_documentation()
25if (index(['vim','help'], &filetype) >= 0)
26execute 'h '.expand('<cword>')
27else
28call CocAction('doHover')
29endif
30endfunction
31
32nnoremap <silent> K :call <SID>show_documentation()<CR>