Coc.nvim: Ability to tab to first option

Created on 9 Nov 2019  路  4Comments  路  Source: neoclide/coc.nvim

Is your feature request related to a problem? Please describe.
Ability to make select the first option instead of moving to second

Describe the solution you'd like
I normally tab to fill the first suggestion in and then move to normal mode as an 'accept'. I cannot find online anywhere that shows how I can make this happen. Can I set the inital 'complete_index' as -1?

Describe alternatives you've considered
This is how ALE worked.

Additional context
.vimrc relevant parts

" coc.vim
inoremap <silent><expr> <TAB>
      \ pumvisible() ? "\<C-n>" :
      \ <SID>check_back_space() ? "\<TAB>" :
      \ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"

function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~# '\s'
endfunction

Typing...
image
Hitting tab once.
image

Most helpful comment

Preselect is enabled by default, you have to use "suggest.enablePreselect": false in your coc-settings.json

All 4 comments

@taybart do you have a fix for this?

Nothing consistent. Maybe I should reopen...I used set completeopt=menuone,noinsert with "suggest.keepCompleteopt": false, which kinda works

Preselect is enabled by default, you have to use "suggest.enablePreselect": false in your coc-settings.json

@chemzqm You are a saint

Was this page helpful?
0 / 5 - 0 ratings

Related issues

npearson72 picture npearson72  路  3Comments

hackingcat picture hackingcat  路  3Comments

iago-lito picture iago-lito  路  3Comments

tom-james-watson picture tom-james-watson  路  3Comments

skylite21 picture skylite21  路  3Comments