-
Notifications
You must be signed in to change notification settings - Fork 3
Plugins
There are three ways to install a plugin.
Go to ./lua/plugins/
folder and create a <plugin_name>.lua
file, with the name of the plugin, like flash.lua
.
Lazy.nvim loads every file in this directory and installs the plugins.
Example: ./lua/plugins/flash.lua
return {
'folke/flash.nvim',
event = 'VeryLazy',
opts = {},
}
Then you have to open Lazy with the command :Lazy
and press I
to install the plugin, or reopen Neovim and lazy.nvim install the plugin automaticaly.
Keep all the plugins in one file. This is the ./lua/plugins/init.lua
file.
Example: ./lua/plugins/init.lua
return {
{
"plugin-one",
-- options ...
-- plugin configuration ...
},
{
"plugin-two",
-- options ...
-- plugin configuration ...
},
{
"plugin-**",
-- options ...
-- plugin configuration ...
},
}
Keep specific plugins in one file, like git.lua
in the ./lua/plugins/
folder.
Example: ./lua/plugins/git.lua
return {
{
'sindrets/diffview.nvim',
-- plugin options ...
-- plugin configuration ...
},
{
'lewis6991/gitsigns.nvim',
-- plugin options ...
-- plugin configuration ...
},
{
'NeogitOrg/neogit',
-- plugin options ...
-- plugin configuration ...
},
}
There are two ways to uninstall a plugin
Delete the the plugin file from the ./lua/plugins/
folder. Open lazy.nvim with the command :Lazy
and press X
.
Add enabled = false
in the plugin option.
Example:
return {
{
'rlane/pounce.nvim',
enabled = false,
},
}
Then open lazy.nvim with :Lazy
and press X
.