dots/config/nvim/lua/aleidk/lazy.lua
aleidk 071be15dc1 re-structure neovim plugins
also delete unused ones
2024-11-20 15:11:55 -03:00

35 lines
1.2 KiB
Lua

-- Bootstrap lazy.nvim
-- Load this file after options has been set
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
vim.opt.rtp:prepend(lazypath)
-- enabled_plugins is injected as a local variable in the top of the file by the dotfile manager
-- See: .dotter/global.toml inside [nvim.files] & [nvim.variables] table
require("lazy").setup({
spec = {
{ import = "aleidk.plugins-core", enabled = enabled_plugins.nvim_core },
{ import = "aleidk.plugins-base", enabled = enabled_plugins.nvim_base },
{ import = "aleidk.plugins-ide", enabled = enabled_plugins.nvim_ide },
},
install = { colorscheme = { "catppuccin" } },
checker = { enabled = true },
})
return {
enabled_plugins
}