My friend wrote a config for me in init.lua but as I am new , I only know how to configure init.vim with vim-plug .. If I got init.lua then how Do i install the package using neovim ?
What you could do, is source your vim script file with your vim-plug block from within init.lua using vim.cmd (see: neovim docs).
To source your vim-plug file from your nvim config location, which in my case on macOS and Debian is $HOME/.config/nvim/ you could place the following in your init.lua:
vim.cmd [[source ~/.config/nvim/vimplugconfig.vim]]
And then ~/.config/nvim/vimplugconfig.vim could look like:
call plug#begin()
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
call plug#end()
If you are using vim-plug for both vim and neovim, here's an example plugin that was already installed with vim-plug in vim, so that you don't have to install it twice. Following the above example here's what you'd have in your ~/.config/nvim/vimplugconfig.vim:
call plug#begin()
Plug 'junegunn/limelight.vim', {'dir': '~/.vim/plugged/limelight.vim'}
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
call plug#end()
Just make sure you don't put the neovim plugin specific lines (e.g. semshi) in your .vimrc, because then vim-plug will try to manage it, and it may fail.
Finally, vim-plug README.md does mention how to install it when it comes to neovim either with curl or flatpak (on Unix/Linux), but they don't actually mention how to do anything in lua specifically when calling vim-plug, so I've personally stuck with the above method while using vim-plug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With