feat: secure calls + disabled all builtin plugins

This commit is contained in:
Pocco81 2021-07-20 13:19:31 -05:00
parent 665fa24783
commit 355178a7bb
3 changed files with 39 additions and 26 deletions

View file

@ -1,15 +1,24 @@
require "options"
local chad_modules = {
"pluginList",
"plugins.bufferline",
"mappings",
"utils",
}
local async
async =
vim.loop.new_async(
vim.schedule_wrap(
function()
require "pluginList"
require "plugins.bufferline"
require "mappings"
require("utils").hideStuff()
for i = 1, #chad_modules, 1 do
local ok, res = xpcall(require, debug.traceback, chad_modules[i])
if not (ok) then
print("NvChad [E0]: There was an error loading the module '" .. chad_modules[i] .. "' -->")
print(res) -- print stack traceback of the error
end
end
async:close()
end
)