I'm trying to set up vim-plug for Neovim using init.lua. I have installed plug.vim under $HOME/.local/share/nvim/site/autoload/plug.vim as your README suggests. Starting nvim results in an error message:
Error detected while processing $HOME/.config/nvim/init.lua:
E5113: Error while calling lua chunk: Vim:E117: Unknown function: #plug
stack traceback:
[C]: in function 'Plug'
$HOME/.config/nvim/init.lua:4: in main chunk
Press ENTER or type command to continue
When I try to call :PlugInstall, however, it doesn't result in an error, but neither does anything useful, telling me "No plugin to install".
The :echo globpath(&rtp, 'autoload/plug.vim') outputs
$HOME/.local/share/nvim/site/autoload/plug.vim
Manually sourcing with :source ~/.local/share/nvim/site/autoload/plug.vim didn't help either.
What am I missing here?
local vim = vim
local Plug = vim.fn['#plug']
vim.call('plug#begin', '~/.config/nvim/plugged')
Plug('https://github.com/lifepillar/vim-gruvbox8.git')
vim.call('plug#end')
:version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Run :checkhealth for more info
I'm trying to set up
vim-plug
for Neovim usinginit.lua
. I have installedplug.vim
under$HOME/.local/share/nvim/site/autoload/plug.vim
as your README suggests. Startingnvim
results in an error message:When I try to call
:PlugInstall
, however, it doesn't result in an error, but neither does anything useful, telling me "No plugin to install".The
:echo globpath(&rtp, 'autoload/plug.vim')
outputsManually sourcing with
:source ~/.local/share/nvim/site/autoload/plug.vim
didn't help either.What am I missing here?