Friendship ended with Packer
I wasn’t me who abandoned the relationship!
The other day I was tweaking my nvim config and wondered if there was a packer update. I checked github and found this:
This repository is currently unmaintained. For the time being (as of August, 2023), it is recommended to use one of the following plugin managers instead:
And the Packer’s author [pronoun]self has switched to Lazy.nvim
I’m fine with some good old legacy softwares, but not with a legacy software manager that still has 300+ open issues! And there are breaking changes(mostly good ones) with every neovim major release. I have to hop – and the migration surprisingly straightforward. And I took the chance to refactor my config.
Now lazy.nvim is my best friend!
My (new) config is hosted at https://github.com/shrik3/schnitzel.nvim
I’m not gonna write in details how I migrate because it was pretty trivial
Maybe you can take away this:
Create a new file lua/lazy.lua
, and put this is init.lua
|
|
In lua/lazy.lua
|
|
The last line suggests lazy to traverse the directory lua/plugins
and load
plugin related config therein. Note that you need to define your
Then create lua/plugins/init.lua
and name your plugins here
return {
"folke/which-key.nvim",
{ "folke/neoconf.nvim", cmd = "Neoconf" },
"folke/neodev.nvim",
-- name your plugins here --
'shrik3/alabaster.nvim',
'shrik3/vim-aspectcpp',
}
But I suggest you only list here those who need no additional setup or configs,
otherwise name and configure them in separate files under lua/plugins
! see
below:
Here is a template for a single plugin: lua/plugins/xyz.lua
|
|
For me the file structure looks like this (tree .config/nvim/lua
):
.
├── init.lua -- main neovim config
├── lazy.lua
└── plugins
├── bufferline.lua
├── comment.lua
├── init.lua
├── lspconfig.lua
├── lualine.lua
├── markdown_and_tex.lua
├── neotree.lua
├── nvim-cmp.lua
├── startify.lua
├── telescope.lua
├── template.txt
└── toggleterm.lua
[+] click to leave a comment [+]
>> SEND COMMENT <<