Shougo / ddc.vim

Dark deno-powered completion framework for Vim/Neovim
MIT License
675 stars 32 forks source link

If I run :Calculator immediately after starting Vim, I will see ‘[ddc] Not found ui: “pum”’. #157

Closed hokorobi closed 1 month ago

hokorobi commented 1 month ago

Problems summary

If I run :Calculator immediately after starting Vim, I will see ‘[ddc] Not found ui: “pum”’.

Expected

The ‘[ddc] Not found ui: “pum”’ is not displayed.

Environment Information

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

vimrc-min

set rtp+=~/_vim/dein/repos/github.com/Shougo/dein.vim
if dein#min#load_state('~/_vim/dein')
  call dein#begin('~/_vim/dein')
  call dein#load_toml('~/vimfiles/vimrc-min.toml')
  call dein#end()
  call dein#save_state()
endif
filetype plugin indent on
syntax enable

vimrc-min.toml

[[plugins]]
repo = 'vim-denops/denops.vim'

[[plugins]]
repo = 'Shougo/ddc.vim'
depends = 'denops.vim'
on_event = 'InsertEnter'
hooks_file = '~/vimfiles/vimrc-min.vim'

[[plugins]]
repo = 'Shougo/pum.vim'

[[plugins]]
repo = 'Shougo/ddc-ui-pum'
on_source = 'ddc.vim'
depends = 'pum.vim'

[[plugins]]
repo = 'Shougo/ddc-source-around'
on_source = 'ddc.vim'

[[plugins]]
repo = 'Shougo/ddc-matcher_head'
on_source = 'ddc.vim'

[[plugins]]
repo = 'Shougo/ddc-sorter_rank'
on_source = 'ddc.vim'

[[plugins]]
repo = 'fedorenchik/calculator.vim'
on_cmd = 'Calculator'

vimrc-min.vim

" hook_source {{{
let s:ddc_sourceOptions = {}
let s:ddc_sourceOptions['_'] = #{
    \   matchers: ['matcher_head'],
    \   sorters: ['sorter_rank'],
    \ }
let s:ddc_options = #{
    \   sourceOptions: s:ddc_sourceOptions,
    \   ui: 'pum',
    \ }
call ddc#custom#patch_global(s:ddc_options)

call ddc#custom#patch_filetype(
    \ ['vim'],
    \ #{sources: ['around']})
call ddc#enable()
" }}}

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

  1. gvim -N -u ~/vimfiles/vimrc-min -U NONE -i NONE
  2. :call dein#recache_runtimepath()
  3. :q
  4. gvim -N -u ~/vimfiles/vimrc-min -U NONE -i NONE
  5. :Calculator
  6. It appears like Screenshot.

Screenshot (if possible)

image

Shougo commented 1 month ago

Reproduced.

Shougo commented 1 month ago

Fixed.

hokorobi commented 1 month ago

Thank you!