forked from otavioschwanck/mood-nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
50 lines (35 loc) · 1022 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
42
43
44
45
46
47
48
49
50
local not_ok = {}
local function setup(path)
local ok, res = pcall(require(path).setup)
if not (ok) then
table.insert(not_ok, path)
if os.getenv("DEBUG") == "true" then
print("[WARN] [" .. path .. "]: " .. res)
end
end
return ok
end
vim.g.mapleader = " "
setup('mood-scripts.install-config')
-- vim script functions
setup('helpers.vim-functions')
setup('helpers.term-functions')
setup('core.plugins')
if #not_ok == 0 then
setup('core.autocmds')
end
setup('core.set')
setup('core.globals')
-- mood
setup('mood-scripts.quick-consult')
-- startup
setup('core.start')
if #not_ok > 0 then
print("Some Error happening when loading neovim: \n")
print("Try to restart Neovim. If the error persist:\n1 - Run :Lazy install\n2 - Run :UpdateMood\n3 - Try to reinstall neovim.\n4 - Create an issue to help to fix\n5 - run neovim with DEBUG=true nvim")
print("Modules with errors: ")
for i = 1, #not_ok, 1 do
print(" - " .. not_ok[i])
end
end
pcall(require, 'user.after_start')