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
This commit is contained in:
parent
e3f0429a72
commit
02f0122ab4
2 changed files with 119 additions and 115 deletions
6
init.lua
6
init.lua
|
|
@ -4,5 +4,9 @@ local chad_modules = {
|
|||
}
|
||||
|
||||
for i = 1, #chad_modules, 1 do
|
||||
pcall(require, chad_modules[i])
|
||||
if not pcall(require, chad_modules[i]) then
|
||||
error("Error loading " .. chad_modules[i] .. "\n")
|
||||
end
|
||||
end
|
||||
|
||||
require("mappings").misc()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue