migrate to lazy.nvim

This commit is contained in:
siduck 2023-01-07 13:41:43 +05:30
parent 5db2f0978d
commit 1b8eff7516
11 changed files with 176 additions and 244 deletions

View file

@ -1,22 +1,6 @@
vim.defer_fn(function()
pcall(require, "impatient")
end, 0)
require "core"
require "core.options"
pcall(function()
loadfile(vim.g.base46_cache .. "bg")()
end)
-- setup packer + plugins
local fn = vim.fn
local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
require("core.bootstrap").chadrc_template()
require("core.bootstrap").packer(install_path)
end
require("core.utils").load_mappings()
local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1]
@ -24,4 +8,18 @@ if custom_init_path then
dofile(custom_init_path)
end
require("core.utils").load_mappings()
-- bootstrap lazy.nvim!
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
require("core.bootstrap").gen_chadrc_template()
require("core.bootstrap").lazy(lazypath)
end
vim.opt.rtp:prepend(lazypath)
require "plugins"
-- load compiled base46 themes
loadfile(vim.g.base46_cache .. "bg")()
loadfile(vim.g.base46_cache .. "defaults")()
loadfile(vim.g.base46_cache .. "statusline")()