replace coc with lspconfig
This commit is contained in:
parent
fd48e88cc3
commit
389c1ee2e2
4 changed files with 93 additions and 22 deletions
20
init.vim
20
init.vim
|
@ -8,8 +8,8 @@ let g:startify_fortune_use_unicode = 1
|
|||
"lua require("plugins")
|
||||
lua require("init")
|
||||
lua require("keymap")
|
||||
lua require("coc")
|
||||
|
||||
" lua require("coc")
|
||||
"
|
||||
set number relativenumber
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
|
@ -42,24 +42,24 @@ let g:ale_fixers = {
|
|||
\ 'c': ['clang-format']
|
||||
\}
|
||||
|
||||
inoremap <silent><expr> <UP> coc#pum#visible() ? coc#pum#prev(1) : ""
|
||||
inoremap <silent><expr> <DOWN> coc#pum#visible() ? coc#pum#next(1) : ""
|
||||
" inoremap <silent><expr> <UP> coc#pum#visible() ? coc#pum#prev(1) : ""
|
||||
" inoremap <silent><expr> <DOWN> coc#pum#visible() ? coc#pum#next(1) : ""
|
||||
|
||||
"Fix escape sending user to normal mode in fzf buffers
|
||||
autocmd FileType fzf tnoremap <buffer><silent><ESC> <ESC>
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ coc#pum#visible() ? coc#_select_confirm() :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
|
||||
\ CheckBackspace() ? "\<TAB>" :
|
||||
\ "\<TAB>"
|
||||
" inoremap <silent><expr> <TAB>
|
||||
" \ coc#pum#visible() ? coc#_select_confirm() :
|
||||
" \ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
|
||||
" \ CheckBackspace() ? "\<TAB>" :
|
||||
" \ "\<TAB>"
|
||||
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
let g:coc_snippet_next = '<tab>'
|
||||
" let g:coc_snippet_next = '<tab>'
|
||||
|
||||
"highlight LineNr guifg=#ff57d8
|
||||
set noexpandtab
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue