Improve error message in lv-config file (#922)

This commit is contained in:
hui.liu 2021-07-14 12:36:57 +08:00 committed by GitHub
parent f87e85a032
commit 75b5cc4d9f
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,9 @@
require "default-config"
require "keymappings"
local status_ok, _ = pcall(vim.cmd, "luafile " .. CONFIG_PATH .. "/lv-config.lua")
local status_ok, error = pcall(vim.cmd, "luafile " .. CONFIG_PATH .. "/lv-config.lua")
if not status_ok then
print "something is wrong with your lv-config"
print(error)
end
require "plugins"
vim.g.colors_name = O.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs.