Closed artemave closed 2 years ago
Reproduced. But it is copilot feature.
copilot checks pumvisible()
and it uses timer feature.
It does not work when completion window is visible.
I think it should be documented in copilot documentaiton.
ddc.vim
+ pum.vim
+ copilot.vim works expected. You should use them instead.
set runtimepath+=~/work/denops.vim
set runtimepath+=~/work/ddc.vim
set runtimepath+=~/work/ddc-around
set runtimepath+=~/work/ddc-matcher_head
set runtimepath+=~/work/ddc-sorter_rank
set runtimepath+=~/work/pum.vim
set runtimepath+=~/src/copilot.vim
call ddc#custom#patch_global('sources', ['around'])
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank']},
\ })
call ddc#custom#patch_global('completionMenu', 'pum.vim')
inoremap <silent><expr> <TAB>
\ pum#visible() ? '<Cmd>call pum#map#insert_relative(+1)<CR>' :
\ (col('.') <= 1 <Bar><Bar> getline('.')[col('.') - 2] =~# '\s') ?
\ '<TAB>' : ddc#manual_complete()
inoremap <S-Tab> <Cmd>call pum#map#insert_relative(-1)<CR>
inoremap <C-n> <Cmd>call pum#map#select_relative(+1)<CR>
inoremap <C-p> <Cmd>call pum#map#select_relative(-1)<CR>
inoremap <C-y> <Cmd>call pum#map#confirm()<CR>
inoremap <C-e> <Cmd>call pum#map#cancel()<CR>
call ddc#enable()
Thanks for quick reply! Ideally, it would be great to have a copilot source for deoplete. So it's all in one menu.
Unfortunately, the copilot item is multiline. It cannot be completed.
This works, thank you!
I really miss how deoplete was giving me suggestions based on parts of the term all mashed together. For example, "usest" would match "user_test". Is it possible to have this with ddc.vim?
You can use ddc-fuzzy
for it.
Problems summary
I am using deoplete and copilot (with neovim) and it seems like deoplete menu often dismisses copilot suggestion. As in, copilot suggestion appears first and then deoplete menu shows up and copilot suggestion disappears at the same time.
Expected
I am able to choose either deoplete or copilot suggestion.
Environment Information
https://github.com/Shougo/deoplete.nvim/commit/1c40f648d2b00e70beb4c473b7c0e32b633bd9ae
OS:
neovim/Vim
:version
output::checkhealth
or:CheckHealth
result(neovim only):Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
Using vim-plug:
How to reproduce the problem from neovim/Vim startup (Required!)
Given
test.rb
:Open it and then see the video down below for how to trigger the problem:
Screenshot (if possible)
https://user-images.githubusercontent.com/23721/154651343-3eed7b17-3e66-4ff0-9a72-2f8593c69986.mp4