[neovim] Migrate lazy to vim.pack
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
neovim/.config/nvim/lazy-lock.json
|
||||
neovim/.config/nvim/nvim-pack-lock.json
|
||||
vim/.vim/nvim_undodir/
|
||||
|
||||
@@ -121,85 +121,59 @@ 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 = {
|
||||
"https://github.com/kaplanz/retrail.nvim",
|
||||
|
||||
-- Indent blankline
|
||||
"https://github.com/lukas-reineke/indent-blankline.nvim",
|
||||
|
||||
-- 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"
|
||||
})
|
||||
|
||||
-- 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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
-- Indent blankline
|
||||
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
|
||||
|
||||
-- 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 = {
|
||||
})
|
||||
require("ibl").setup()
|
||||
require("neo-tree").setup({
|
||||
window = {
|
||||
width = 32
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Colorscheme
|
||||
cmd.colorscheme("gruber-darker")
|
||||
|
||||
-- Plugin keymaps
|
||||
map("n", "<leader>f", ":Pick files<CR>")
|
||||
map("n", "<leader>b", ":Pick buffers<CR>")
|
||||
|
||||
Reference in New Issue
Block a user