Refactor LSP and add notify

This commit is contained in:
2023-09-03 00:33:33 +02:00
parent a4f0d30976
commit e6bd54bb0c
11 changed files with 102 additions and 287 deletions
+10 -6
View File
@@ -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