2022-08-12 02:19:12 -04:00
|
|
|
vim.defer_fn(function()
|
|
|
|
pcall(require, "impatient")
|
|
|
|
end, 0)
|
|
|
|
|
2022-05-23 03:24:03 -04:00
|
|
|
require "core"
|
|
|
|
require "core.options"
|
2022-05-31 15:19:23 -04:00
|
|
|
|
2022-11-21 21:59:48 -05:00
|
|
|
pcall(function()
|
|
|
|
loadfile(vim.g.base46_cache .. "bg")()
|
|
|
|
end)
|
|
|
|
|
2022-05-23 03:24:03 -04:00
|
|
|
-- setup packer + plugins
|
2022-08-05 23:58:05 -04:00
|
|
|
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
|
|
|
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" })
|
|
|
|
print "Cloning packer .."
|
|
|
|
fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }
|
|
|
|
|
2022-11-19 01:15:33 -05:00
|
|
|
os.execute("mkdir -p " .. vim.g.base46_cache)
|
2022-11-17 11:02:55 -05:00
|
|
|
|
2022-08-05 23:58:05 -04:00
|
|
|
-- install plugins + compile their configs
|
|
|
|
vim.cmd "packadd packer.nvim"
|
2022-11-17 12:46:28 -05:00
|
|
|
|
2022-08-05 23:58:05 -04:00
|
|
|
require "plugins"
|
|
|
|
vim.cmd "PackerSync"
|
2022-09-10 15:37:44 -04:00
|
|
|
|
|
|
|
-- install binaries from mason.nvim & tsparsers
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
pattern = "PackerComplete",
|
|
|
|
callback = function()
|
2022-11-17 12:46:28 -05:00
|
|
|
require("base46").load_all_highlights()
|
|
|
|
|
2022-09-10 15:37:44 -04:00
|
|
|
vim.cmd "bw | silent! MasonInstallAll" -- close packer window
|
|
|
|
require("packer").loader "nvim-treesitter"
|
2022-12-03 00:01:44 -05:00
|
|
|
|
|
|
|
local statusline_theme = require("core.utils").load_config().ui.statusline.theme
|
|
|
|
vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. statusline_theme .. "').run()"
|
2022-09-10 15:37:44 -04:00
|
|
|
end,
|
|
|
|
})
|
2022-08-05 23:58:05 -04:00
|
|
|
end
|
2022-05-23 05:24:59 -04:00
|
|
|
|
2022-12-17 06:34:52 -05:00
|
|
|
local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1]
|
|
|
|
|
|
|
|
if custom_init_path then
|
|
|
|
dofile(custom_init_path)
|
|
|
|
end
|
2022-08-15 09:53:55 -04:00
|
|
|
|
|
|
|
require("core.utils").load_mappings()
|