Shougo / dein.vim

:zap: Dark powered Vim/Neovim plugin manager
MIT License
3.43k stars 196 forks source link

Command not found #443

Closed nabezokodaikon closed 2 years ago

nabezokodaikon commented 2 years ago

Warning: I will close the bug issue without the minimal init.vim and the reproduce ways.

Problems summary

When I do a delayed read of fuzzy-motion, it says there are no commands.

Expected

Lazy loading of fuzzy-motion is possible. By the way, if you enter the same command twice, it will succeed.

Environment Information (Required!)

Provide a minimal .vimrc with less than 50 lines (Required!)

init.vim

if &compatible
    set nocompatible
endif

let $CACHE = expand('~/.cache')

if !isdirectory(expand($CACHE))
    call mkdir(expand($CACHE), 'p')
endif

let s:dein_dir = expand('$CACHE/dein')
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'

if &runtimepath !~# '/dein.vim'
    if !isdirectory(s:dein_repo_dir)
        execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir
    endif
    execute 'set runtimepath^=' . s:dein_repo_dir
endif

call dein#begin(s:dein_dir, expand('<sfile>'))

call dein#load_toml('~/.config/nvim/dein/deinlazy.toml', { 'lazy': 1 })

call dein#end()
call dein#save_state()

~/.config/nvim/dein/deinlazy.toml

[[plugins]]
repo = 'vim-denops/denops.vim'
[[plugins]]
repo = 'yuki-yano/fuzzy-motion.vim'
depends = 'denops.vim'
on_cmd = 'FuzzyMotion'

The reproduce ways from Vim starting (Required!)

  1. Start Neovim.
  2. Run call dein#update() command.
  3. Restart Neovim.
  4. Run FuzzyMotion command.

Screen shot (if possible)

スクリーンショット 2022-02-09 21 29 54

Shougo commented 2 years ago

It works for me.

[[plugins]]
repo = 'yuki-yano/fuzzy-motion.vim'
depends = 'denops.vim'
if = 'has("nvim")'
on_cmd = 'FuzzyMotion'
hook_add = '''
  nnoremap F   <Cmd>FuzzyMotion<CR>
'''

It is not problem of dein.

Shougo commented 2 years ago

Well, it is reproduced.

Shougo commented 2 years ago

It is denops lazy loading problem.

nabezokodaikon commented 2 years ago

So that's it. understand.

Shougo commented 2 years ago

Fixed.

nabezokodaikon commented 2 years ago

I see that you have taken measures specifically for denops.vim. Thank you very much.

Shougo commented 2 years ago

Yes. denops is officially supported