Refactor LSP and add notify
This commit is contained in:
@@ -14,14 +14,18 @@
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
local module_name = "base"
|
||||
|
||||
local utils = require("utils")
|
||||
|
||||
local files = { "globals", "options", "autocommands", "mappings", }
|
||||
|
||||
for _, file in ipairs(files) do
|
||||
local pkg = "core." .. file
|
||||
local ok, err = pcall(require, pkg)
|
||||
if not ok then
|
||||
print("Error while loading package " .. pkg)
|
||||
print(err)
|
||||
utils.err("Error while loading package " .. pkg, module_name)
|
||||
utils.err(err, module_name)
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -31,15 +35,15 @@ if vim.g.vscode then
|
||||
else
|
||||
local ok, err = pcall(require, "bootstrap")
|
||||
if not ok then
|
||||
print("Error during bootstrap")
|
||||
print(err:gsub("\t", " "))
|
||||
utils.err("Error during bootstrap", module_name)
|
||||
utils.err(err:gsub("\t", " "), module_name)
|
||||
return
|
||||
end
|
||||
|
||||
ok, err = pcall(require, "plugins")
|
||||
if not ok then
|
||||
print("Error while loading plugins")
|
||||
print(err:gsub("\t", " "))
|
||||
utils.err("Error while loading plugins", module_name)
|
||||
utils.err(err:gsub("\t", " "), module_name)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user