diff --git a/init.lua b/init.lua index bfb86e6..354f5b2 100644 --- a/init.lua +++ b/init.lua @@ -6,42 +6,13 @@ if not (vim.env.LAZY or vim.loop.fs_stat(lazypath)) then end vim.opt.rtp:prepend(lazypath) -local lazy_loaded, lazy = pcall(require, "lazy") -- validate that lazy is available -if not lazy_loaded then +-- validate that lazy is available +if not pcall(require, "lazy") then -- stylua: ignore vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) vim.fn.getchar() vim.cmd.quit() end -lazy.setup({ - { - "AstroNvim/AstroNvim", - branch = "v4", -- TODO: change `branch="v4"` to `version="^4"` on release - import = "astronvim.plugins", - opts = { -- AstroNvim options must be set with the `import` key - mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up - maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up - icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) - pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override - }, - }, - { import = "community" }, - { import = "plugins" }, -} --[[@as LazySpec]], { - install = { colorscheme = { "astrodark", "habamax" } }, - performance = { - rtp = { - -- disable some rtp plugins, add more to your liking - disabled_plugins = { - "gzip", - "netrwPlugin", - "tarPlugin", - "tohtml", - "zipPlugin", - }, - }, - }, -} --[[@as LazyConfig]]) - +require "lazy_setup" require "polish" diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua new file mode 100644 index 0000000..88116f0 --- /dev/null +++ b/lua/lazy_setup.lua @@ -0,0 +1,29 @@ +require("lazy").setup({ + { + "AstroNvim/AstroNvim", + branch = "v4", -- TODO: change `branch="v4"` to `version="^4"` on release + import = "astronvim.plugins", + opts = { -- AstroNvim options must be set here with the `import` key + mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up + maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up + icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) + pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override + }, + }, + { import = "community" }, + { import = "plugins" }, +} --[[@as LazySpec]], { + install = { colorscheme = { "astrodark", "habamax" } }, + performance = { + rtp = { + -- disable some rtp plugins, add more to your liking + disabled_plugins = { + "gzip", + "netrwPlugin", + "tarPlugin", + "tohtml", + "zipPlugin", + }, + }, + }, +} --[[@as LazyConfig]])