Open
Description
I have an idea of trying to combine as much of my Vim and Neovim configuration and I'm wondering if there's a neat way of having 'shared plugins', 'vim-only plugins' and 'neovim-only plugins'. I think the following might work but wondered if there was another way:
" shared plugins
call minpac#init()
call minpac#add("k-takata/minpac", { "type": "opt" })
call minpac#add("tpope/vim-fugitive")
" ... etc
" ... then minpac#update() / minpac#clean()
" vim-only plugins
call minpac#init({ "dir": "/vim/plugins/path" })
call minpac#add("prabirshrestha/vim-lsp" )
" ... etc
" ... then minpac#update() / minpac#clean()
" neovim-only plugins
call minpac#init({ "dir": "/neovim/plugins/path" })
call minpac#add("neovim/nvim-lspconfig")
" ... etc
" ... then minpac#update() / minpac#clean()
" ... then inject those custom paths depending on vim/neovim
if has("nvim")
set packpath^=/neovim/plugins/path
else
set packpath^=/vim/plugins/path
endif
The current downside of this approach is the awkwardness of having to do multiple update()
or clean()
s.
I hope that's clear and would love to hear what thoughts people have :)
Metadata
Metadata
Assignees
Labels
No labels