feat(nvim): removed coc

This commit is contained in:
u2515h
2023-12-27 17:43:28 +01:00
parent 8851240d87
commit abbbb93cef
3 changed files with 60 additions and 55 deletions

View File

@@ -5,45 +5,6 @@ set hidden
" disable mouse
set mouse=
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Rename
nmap <leader>rn <Plug>(coc-rename)
" Use K to show documentation in preview window.
nnoremap <silent> K :call ShowDocumentation()<CR>
nmap <leader>ac <Plug>(coc-codeaction)
nmap <leader>as <Plug>(coc-codeaction-cursor)
nmap <leader>cl <Plug>(coc-codelens-action)
nmap <silent> [G <Plug>(coc-diagnostic-next-error)
nmap <silent> ]G <Plug>(coc-diagnostic-prev-error)
nmap <silent> [g <Plug>(coc-diagnostic-next)
nmap <silent> ]g <Plug>(coc-diagnostic-prev)
function! ShowDocumentation()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('K', 'in')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
nmap <leader>F <Plug>(coc-format)
" " Copy to clipboard
vnoremap <leader>y "+y
@@ -67,9 +28,6 @@ map <leader>to :tabonly<cr>
" Display line numbers
set number relativenumber
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
map <F3> :mksession! .nvim_session <cr> " Quick write session with F3
map <F4> :source .nvim_session <cr> " And load session with F4