init.lua: Print error message if custom init.lua cannot be called properly

This commit is contained in:
Akianonymus 2022-01-22 12:10:07 +05:30 committed by siduck
parent b86ae3b170
commit 4c85f25a09
1 changed files with 4 additions and 1 deletions

View File

@ -15,4 +15,7 @@ end
require("core.mappings").misc() require("core.mappings").misc()
-- try to call custom init -- try to call custom init
pcall(require, "custom") local ok, err = pcall(require, "custom")
if not ok then
vim.notify("Error loading custom/init.lua\n\n" .. err)
end