my-nvim-setup/init.lua
Akianonymus 02f0122ab4 mappings|init: Move init mappings to a function, only call when required | Show err message for init
because mappings.lua is called from multiple places, so there should't be any code that executes without calling a specific function

show error message when something fails in init.lua
makes no sense to not

rearrange plugin functions alphabetically, but keep misc at top
2021-08-19 14:19:12 +05:30

12 lines
229 B
Lua

local chad_modules = {
"options",
"mappings",
}
for i = 1, #chad_modules, 1 do
if not pcall(require, chad_modules[i]) then
error("Error loading " .. chad_modules[i] .. "\n")
end
end
require("mappings").misc()