Fix snippet expand
This commit is contained in:
parent
ccf00845d1
commit
c2ce602c88
7
init.vim
7
init.vim
@ -46,16 +46,17 @@ let g:gruvbox_contrast_light = 'hard'
|
||||
"Coc.nvim
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<cr>"
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? coc#_select_confirm() :
|
||||
\ coc#pum#visible() ? coc#_select_confirm() :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ CheckBackSpace() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
|
||||
function! s:check_back_space() abort
|
||||
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>'
|
||||
nnoremap <leader>e :CocCommand snippets.editSnippets<CR>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user