[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

2
.gitignore vendored
View File

@@ -1,2 +1,2 @@
neovim/.config/nvim/lazy-lock.json neovim/.config/nvim/nvim-pack-lock.json
vim/.vim/nvim_undodir/ vim/.vim/nvim_undodir/

View File

@@ -121,84 +121,58 @@ end)
-- [[ PLUGINS ]] -- -- [[ PLUGINS ]] --
-- Bootstrap lazy.nvim vim.pack.add({
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({
-- Colorscheme -- Colorscheme
{ "blazkowolf/gruber-darker.nvim" }, "https://github.com/blazkowolf/gruber-darker.nvim",
-- Background trasparency -- Background trasparency
{ "xiyaowong/transparent.nvim" }, "https://github.com/xiyaowong/transparent.nvim",
-- Fuzzy finder -- Fuzzy finder
{ "echasnovski/mini.pick", opts = {} }, "https://github.com/echasnovski/mini.pick",
-- Advanced undo tree -- Advanced undo tree
{ "mbbill/undotree" }, "https://github.com/mbbill/undotree",
-- Git integration -- Git integration
{ "tpope/vim-fugitive" }, "https://github.com/tpope/vim-fugitive",
{ "lewis6991/gitsigns.nvim", opts = {} }, "https://github.com/lewis6991/gitsigns.nvim",
-- Text aligning -- Text aligning
{ "Vonr/align.nvim", branch = "v2" }, { src = "https://github.com/Vonr/align.nvim", version = "v2" },
-- Multi cursor -- Multi cursor
{ "brenton-leighton/multiple-cursors.nvim", opts = {} }, "https://github.com/brenton-leighton/multiple-cursors.nvim",
-- Trailing whitespace -- Trailing whitespace
{ "https://github.com/kaplanz/retrail.nvim",
"kaplanz/retrail.nvim",
opts = {
hlgroup = "Error",
trim = {
auto = false, -- Auto trim on BufWritePre
}
}
},
-- Indent blankline -- Indent blankline
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} }, "https://github.com/lukas-reineke/indent-blankline.nvim",
-- File tree -- File tree
{ { src = "https://github.com/nvim-neo-tree/neo-tree.nvim", version = vim.version.range("3") },
"nvim-neo-tree/neo-tree.nvim", "https://github.com/nvim-lua/plenary.nvim",
branch = "v3.x", "https://github.com/MunifTanjim/nui.nvim",
dependencies = { "https://github.com/nvim-tree/nvim-web-devicons"
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
lazy = false,
opts = {
window = {
width = 32
}
}
}
}) })
-- Colorscheme -- Load plugins
cmd.colorscheme("gruber-darker") 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 -- Plugin keymaps
map("n", "<leader>f", ":Pick files<CR>") map("n", "<leader>f", ":Pick files<CR>")