Unit #0-10
Learning Outcome
At the end of this lesson, you will be able to:
use plugins in Neovim
using Lazy.Nvim
Lesson
plugins can add super useful functionality to nvim
lazy.nvim, is the current most common plugin manager, so install it
we will will need to have a "special" directory structure to make all our plugins easier to use
nvim/lua/plugins
add the following to your init.lua:
require "user.options"
require "user.keymaps"
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")then in the "plugins" directory, you can add a file for each plugin, for example:
here are all the themes you an choose: https://github.com/nvim-lualine/lualine.nvim/blob/master/THEMES.md
We will be using Lazy.nvim and not Packer.nvim.
They both do the same thing