[neovim] Migrate lazy to vim.pack

This commit is contained in:
2026-04-08 00:54:52 +02:00
parent 6d49b792c3
commit 04f1de0000
2 changed files with 34 additions and 60 deletions

View File

@@ -121,84 +121,58 @@ end)
-- [[ PLUGINS ]] --
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({
"git", "clone", "--filter=blob:none", "--branch=stable",
lazyrepo, lazypath
})
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
opt.rtp:prepend(lazypath)
-- Plugins
require("lazy").setup({
vim.pack.add({
-- Colorscheme
{ "blazkowolf/gruber-darker.nvim" },
"https://github.com/blazkowolf/gruber-darker.nvim",
-- Background trasparency
{ "xiyaowong/transparent.nvim" },
"https://github.com/xiyaowong/transparent.nvim",
-- Fuzzy finder
{ "echasnovski/mini.pick", opts = {} },
"https://github.com/echasnovski/mini.pick",
-- Advanced undo tree
{ "mbbill/undotree" },
"https://github.com/mbbill/undotree",
-- Git integration
{ "tpope/vim-fugitive" },
{ "lewis6991/gitsigns.nvim", opts = {} },
"https://github.com/tpope/vim-fugitive",
"https://github.com/lewis6991/gitsigns.nvim",
-- Text aligning
{ "Vonr/align.nvim", branch = "v2" },
{ src = "https://github.com/Vonr/align.nvim", version = "v2" },
-- Multi cursor
{ "brenton-leighton/multiple-cursors.nvim", opts = {} },
"https://github.com/brenton-leighton/multiple-cursors.nvim",
-- Trailing whitespace
{
"kaplanz/retrail.nvim",
opts = {
hlgroup = "Error",
trim = {
auto = false, -- Auto trim on BufWritePre
}
}
},
-- Trailing whitespace
"https://github.com/kaplanz/retrail.nvim",
-- Indent blankline
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
-- Indent blankline
"https://github.com/lukas-reineke/indent-blankline.nvim",
-- File tree
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
lazy = false,
opts = {
window = {
width = 32
}
}
}
-- File tree
{ src = "https://github.com/nvim-neo-tree/neo-tree.nvim", version = vim.version.range("3") },
"https://github.com/nvim-lua/plenary.nvim",
"https://github.com/MunifTanjim/nui.nvim",
"https://github.com/nvim-tree/nvim-web-devicons"
})
-- Colorscheme
-- Load plugins
cmd.colorscheme("gruber-darker")
require("mini.pick").setup()
require("multiple-cursors").setup()
require("retrail").setup({
hlgroup = "Error",
trim = {
auto = false, -- Auto trim on BufWritePre
}
})
require("ibl").setup()
require("neo-tree").setup({
window = {
width = 32
}
})
-- Plugin keymaps
map("n", "<leader>f", ":Pick files<CR>")