Shougo / dein.vim

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

Q: How to have plugin load conditions in TOML format? #389

Closed hasufell closed 3 years ago

hasufell commented 3 years ago

Basically, I want to translate this into toml:

if has('nvim')
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/deoplete.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif

I know I can have conditionals in build, but I don't know how to make nvim-yarp and vim-hug-neovim-rpc only load in non-nvim in the toml file format.

Shougo commented 3 years ago
[[plugins]]
repo = 'Shougo/deoplete.nvim'

[[plugins]]
repo = 'roxma/nvim-yarp'
on_if = '!has("nvim")'

[[plugins]]
repo = 'roxma/vim-hug-neovim-rpc'
on_if = '!has("nvim")'

Note: :UpdateRemotePlugins is executed automatically in dein.vim