[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/
|
vim/.vim/nvim_undodir/
|
||||||
|
|||||||
@@ -121,85 +121,59 @@ 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 = {
|
-- 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",
|
hlgroup = "Error",
|
||||||
trim = {
|
trim = {
|
||||||
auto = false, -- Auto trim on BufWritePre
|
auto = false, -- Auto trim on BufWritePre
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
},
|
require("ibl").setup()
|
||||||
|
require("neo-tree").setup({
|
||||||
-- 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 = {
|
|
||||||
window = {
|
window = {
|
||||||
width = 32
|
width = 32
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Colorscheme
|
|
||||||
cmd.colorscheme("gruber-darker")
|
|
||||||
|
|
||||||
-- Plugin keymaps
|
-- Plugin keymaps
|
||||||
map("n", "<leader>f", ":Pick files<CR>")
|
map("n", "<leader>f", ":Pick files<CR>")
|
||||||
map("n", "<leader>b", ":Pick buffers<CR>")
|
map("n", "<leader>b", ":Pick buffers<CR>")
|
||||||
|
|||||||
Reference in New Issue
Block a user