-
How can I call a coc function like For example I have this: " Use <tab> to trigger completion
fun! s:coc_comp_tab() abort
if pumvisible()
return "\<c-n>"
" If the next char is closed pairs, jump
elseif getline('.')[col('.') - 1] =~ "['\"`)\\]}>]"
return "\<right>"
" If the previous char is space, tab
elseif getline('.')[col('.') - 2] =~# '\s'
return "\<tab>"
else
" Fucking try and error
coc#refresh()
" call coc#refresh()
" return "\<c-o>:call coc#refresh()\<cr>"
endif
endfun
inore <silent><expr> <tab> <sid>coc_comp_tab() Please see the I want it to behave like the official example, when there's no condition meets, just do inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
function! coc#refresh() abort
return "\<c-r>=coc#start()\<CR>"
endfunction You should return the expression the same as |
Beta Was this translation helpful? Give feedback.
-
Where's Also another function that doesn't have documentation like |
Beta Was this translation helpful? Give feedback.
You should return the expression the same as
coc#refresh()