Skip to content
Snippets Groups Projects
Commit f16213ae authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Tune CoC

parent eeb665f5
Branches
No related tags found
No related merge requests found
......@@ -896,6 +896,10 @@ function! s:check_back_space() abort
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" CoC
"let g:coc_user_config = {}
"let g:coc_user_config['coc.preferences.jumpCommand'] = 'vsp'
" Use <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
......@@ -916,6 +920,10 @@ nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> <leader>gs :call CocAction('jumpDefinition', 'split')<CR>
nmap <silent> <leader>gd :call CocAction('jumpDefinition', 'vsplit')<CR>
nmap <silent> <leader>gt :call CocAction('jumpDefinition', 'tabe')<CR>
nmap <silent> <leader>me <Plug>(coc-command)expandMacro
" Use K to show documentation in preview window
......@@ -936,7 +944,8 @@ autocmd CursorHold * silent call CocActionAsync('highlight')
nmap <leader>rn <Plug>(coc-rename)
" Project wide rename word
nnoremap <leader>prw :CocSearch <C-R>=expand("<cword>")<CR><CR>
nnoremap <leader>pwr :CocSearch <C-R>=expand("<cword>")<CR><CR>
nnoremap <leader>rw :CocSearch <C-R>=expand("<cword>")<CR><CR>
" Remap for format selected region
xmap <leader>F <Plug>(coc-format-selected)
......@@ -1011,6 +1020,7 @@ let g:coc_global_extensions = [
\'coc-rust-analyzer',
\'coc-markdownlint',
\'coc-yaml',
\'coc-toml',
\'coc-pyright',
\'coc-diagnostic',
\'coc-spell-checker',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment