forked from AstroNvim/AstroNvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
41 lines (34 loc) · 931 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
vim.opt.rtp:append(vim.fn.stdpath "config" .. "/../astronvim")
local impatient_ok, impatient = pcall(require, "impatient")
if impatient_ok then
impatient.enable_profile()
end
local utils = require "core.utils"
utils.bootstrap()
local sources = {
"core.options",
"core.plugins",
"core.autocmds",
"core.mappings",
"configs.which-key-register",
}
for _, source in ipairs(sources) do
local status_ok, fault = pcall(require, source)
if not status_ok then
error("Failed to load " .. source .. "\n\n" .. fault)
elseif source == "core.plugins" then
utils.compiled()
end
end
local status_ok, ui = pcall(require, "core.ui")
if status_ok then
for ui_addition, enabled in pairs(utils.user_settings().ui) do
if enabled and type(ui[ui_addition]) == "function" then
ui[ui_addition]()
end
end
end
local polish = utils.user_plugin_opts "polish"
if type(polish) == "function" then
polish()
end