Shougo / ddc.vim

Dark deno-powered completion framework for Vim/NeoVim
MIT License
669 stars 33 forks source link

Completion is not be fired on post confirm #136

Closed ogaken-1 closed 1 year ago

ogaken-1 commented 1 year ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

const foo = {
  bar: 'a',
}

On a buffer like above, I want to complete bar on fo<C-n><C-y>..

Expected

Popupmenu will be displayed.

Environment Information

Provide a minimal init.vim/vimrc without plugin managers (Required!)

const s:packpath = expand('<script>:p:h')
let &packpath = s:packpath
const s:ToPackPath = { name -> s:packpath .. '/pack/github.com/opt/' .. name }

function s:PackAdd(ghrepo) abort
  const plugin = #{
        \ path: s:ToPackPath(a:ghrepo),
        \ repo: a:ghrepo->printf('https://github.com/%s.git'),
        \ name: a:ghrepo,
        \ }
  if !isdirectory(plugin.path)
    call system(['git', 'clone', plugin.repo, plugin.path])
  endif
  exec 'packadd' plugin.name
endfunction

call s:PackAdd('vim-denops/denops.vim')
call s:PackAdd('Shougo/ddc.vim')
call s:PackAdd('Shougo/ddc-ui-native')
call s:PackAdd('Shougo/ddc-source-nvim-lsp')
call s:PackAdd('neovim/nvim-lspconfig')

call ddc#custom#set_global(#{
      \   ui: 'native',
      \   sources: [
      \     #{
      \       name: 'nvim-lsp',
      \       options: #{
      \         forceCompletionPattern: '\.',
      \         minAutoCompleteLength: 1,
      \       },
      \     },
      \   ],
      \ })

call ddc#enable()

lua << EOF
require('lspconfig').denols.setup {}
EOF

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Put above init.vim.

  2. Start neovim by $nvim -u ./init.vim test.ts.

  3. Paste below code block to current buffer.

    const foo = {
      bar: 'a',
    }
  4. Type fo<C-y>..

Screenshot (if possible)

Upload the log messages by :redir and :message (if errored)

Shougo commented 1 year ago

Fixed.

ogaken-1 commented 1 year ago

It looks working. Thank you!