Install and setup Neovim using LazyVim
This is a post on how I installed and setup Neovim using LazyVim in my Fedora/Linux machines.
Delete all existing nvim
configuration files and cached data. Do this
only if you already have a previous configuration of
Neovim without using LazyVim.
# required
rm -vrf ~/.config/nvim
# optional but recommended
rm -vrf ~/.local/share/nvim
rm -vrf ~/.local/state/nvim
rm -vrf ~/.cache/nvim
Clone the LazyVim starter template.
git clone https://github.com/LazyVim/starter \
~/.config/nvim
Remove the .git
folder then add my nvim
GitHub repository’s URL.
rm -vrf ~/.config/nvim/.git
git init
git remote add origin git@github.com:arantebw/nvim.git
Enjoy code editing using the new instance of Neovim!
nvim .
Check the new installation’s status using LazyHealth
.
:LazyHealth
In my case, I encountered an error that luarocks
was missing, so I need to
install it.
wget \
https://luarocks.org/releases/luarocks-3.11.1.tar.gz
tar zxpf luarocks-3.11.1.tar.gz
cd luarocks-3.11.1
./configure && make && sudo make install
# If errors are encountered, follow the next steps.
Check the current version of lua
installed.
lua -v
If lua
is not installed, then run the following to install it and its
dependencies.
sudo dnf install lua lua-devel
Update the plocate
database to find the lua
required header files.
nice -n 19 ionice -c 3 sudo updatedb
plocate lua.h
These are the files that you need to have to make sure all required header files are installed.
/usr/include/lua.h
/usr/include/lua.hpp
Then, re-run the ./configure
command with the --lua-version
as an option.
./configure --lua-version=5.4 && make \
&& sudo make install
Finally, install the extras as you need them.
:LazyExtras
LazyVim calls the lazy loaded plugins in your Neovim setup.
That’s it, enjoy code editing with Neovim bootstrapped LazyVim.