-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
init.lua
37 lines (29 loc) · 812 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
-- ======== Init ========
local uv = vim.uv or vim.loop
local stdpath_config = vim.fn.stdpath("config")
local function vimloader(handle)
local vimfile = stdpath_config .. string.format("/%s.vim", handle)
if uv.fs_stat(vimfile) then
vim.fn.execute(string.format("source %s", vimfile), true)
end
end
local function lualoader(handle)
local luafile = stdpath_config .. string.format("/lua/%s.lua", handle)
if uv.fs_stat(luafile) then
require(handle)
end
end
-- preinit.vim and preinit.lua
vimloader("preinit")
lualoader("preinit")
-- options
require("builtin.options")
require("builtin.lsp")
require("builtin.diagnostic")
-- plugins
require("configs.folke.lazy-nvim.config")
-- others
require("builtin.others")
-- postinit.vim and postinit.lua
vimloader("postinit")
lualoader("postinit")