neovim-config/init.lua

51 lines
1.4 KiB
Lua
Raw Normal View History

vim.defer_fn(function()
pcall(require, "impatient")
end, 0)
require "core"
require "core.options"
2022-05-31 19:19:23 +00:00
pcall(function()
loadfile(vim.g.base46_cache .. "bg")()
end)
-- setup packer + plugins
2022-08-06 03:58:05 +00: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-12-23 10:29:25 +00:00
vim.fn.mkdir(vim.g.base46_cache, "p")
2022-11-17 16:02:55 +00:00
2022-08-06 03:58:05 +00:00
-- install plugins + compile their configs
vim.cmd "packadd packer.nvim"
2022-11-17 17:46:28 +00:00
2022-08-06 03:58:05 +00:00
require "plugins"
vim.cmd "PackerSync"
-- install binaries from mason.nvim & tsparsers
vim.api.nvim_create_autocmd("User", {
pattern = "PackerComplete",
callback = function()
2022-11-17 17:46:28 +00:00
require("base46").load_all_highlights()
vim.cmd "bw | silent! MasonInstallAll" -- close packer window
require("packer").loader "nvim-treesitter"
2022-12-03 05:01:44 +00:00
local statusline_theme = require("core.utils").load_config().ui.statusline.theme
vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. statusline_theme .. "').run()"
end,
})
2022-08-06 03:58:05 +00:00
end
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
require("core.utils").load_mappings()