throw an error if a plugin that is not lazy depends on a lazy plugin #175

nhooyr opened this Issue Jan 3, 2017 · 2 comments


None yet

2 participants

nhooyr commented Jan 3, 2017 edited

So imagine you have the following TOML

repo = 'Shougo/deoplete.nvim'
on_event = 'InsertEnter'
hook_source = '''
let g:deoplete#enable_at_startup = 1
let g:deoplete#omni#input_patterns = {}

repo = 'dag/vim-fish'
depends = 'deoplete.nvim'
hook_source = '''
let = '\w+'
augroup fish_ft
  autocmd FileType fish setlocal keywordprg=:Man
augroup END

vim-fish isn't lazy, so it will always load deoplete.nvim even though deoplete.nvim is configured to be a lazy loading plugin. It will also not load the hook_source of deoplete.nvim. This configuration should throw an error.

nhooyr commented Jan 3, 2017 edited

I noticed something really weird.

Here is the init.vim

set runtimepath^=/tmp/dein/repos/
if dein#load_state('/tmp/dein')
  call dein#begin('/tmp/dein')
  call dein#load_toml('/tmp/dein.toml')
  call dein#end()
  call dein#save_state()

dein.toml is the toml file given above.

Weirdly enough, deoplete works fine the first time neovim is launched (or init.vim/dein.toml are updated), but every time after that, deoplete is not automatically enabled

Here is a video

This seems to only happen with dein#load_state, if you remove that if statement then deoplete always loads fine.

@Shougo Shougo added a commit that referenced this issue Jan 4, 2017
@Shougo Fix #175 implement the error check f5ecaea
Shougo commented Jan 4, 2017

I have implemented the feature.
Please create new issue if you have en-counted the problem.

@Shougo Shougo closed this Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment