1
0

Enable parameter/snippet jumping.

This commit is contained in:
2025-11-13 08:10:14 +01:00
parent 7a853c9a5e
commit c503a456be

View File

@@ -52,23 +52,28 @@ set foldmethod=syntax
set scrolloff=7
" CoC settings
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ coc#expandableOrJumpable() ? "\<C-r>=coc#snippet#next()\<CR>" :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
"inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
"inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
nmap <C-a> :CocAction<CR>
inoremap <silent><expr> <S-TAB>
\ coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
\ coc#expandableOrJumpable() ? "\<C-r>=coc#snippet#prev()\<CR>" :
\ CheckBackspace() ? "\<S-Tab>" :
\ coc#refresh()
let g:coc_disable_startup_warning = 1
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
let g:coc_snippet_next = '<Tab>'
let g:coc_snippet_prev = '<S-Tab>'
func! s:my_colors_setup() abort
" this is an example