summaryrefslogtreecommitdiff
path: root/lua/lvim
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim')
-rw-r--r--lua/lvim/bootstrap.lua14
-rw-r--r--lua/lvim/config/defaults.lua2
-rw-r--r--lua/lvim/core/log.lua3
3 files changed, 12 insertions, 7 deletions
diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua
index 55a22502..3fd000e3 100644
--- a/lua/lvim/bootstrap.lua
+++ b/lua/lvim/bootstrap.lua
@@ -112,11 +112,15 @@ end
---Update LunarVim
---pulls the latest changes from github and, resets the startup cache
function M:update()
- reload("lvim.utils.hooks").run_pre_update()
- local ret = reload("lvim.utils.git").update_base_lvim()
- if ret then
- reload("lvim.utils.hooks").run_post_update()
- end
+ require("lvim.core.log"):info "Trying to update LunarVim..."
+
+ vim.schedule(function()
+ reload("lvim.utils.hooks").run_pre_update()
+ local ret = reload("lvim.utils.git").update_base_lvim()
+ if ret then
+ reload("lvim.utils.hooks").run_post_update()
+ end
+ end)
end
return M
diff --git a/lua/lvim/config/defaults.lua b/lua/lvim/config/defaults.lua
index 1bd57b94..6a00aaa6 100644
--- a/lua/lvim/config/defaults.lua
+++ b/lua/lvim/config/defaults.lua
@@ -26,7 +26,7 @@ return {
lang = {},
log = {
---@usage can be { "trace", "debug", "info", "warn", "error", "fatal" },
- level = "warn",
+ level = "info",
viewer = {
---@usage this will fallback on "less +F" if not found
cmd = "lnav",
diff --git a/lua/lvim/core/log.lua b/lua/lvim/core/log.lua
index c4f727be..f4ff114a 100644
--- a/lua/lvim/core/log.lua
+++ b/lua/lvim/core/log.lua
@@ -41,7 +41,7 @@ function Log:init()
lvim = {
sinks = {
structlog.sinks.Console(log_level, {
- async = true,
+ async = false,
processors = {
structlog.processors.Namer(),
structlog.processors.StackWriter({ "line", "file" }, { max_parents = 0, stack_level = 2 }),
@@ -68,6 +68,7 @@ function Log:init()
},
}
+ lvim_log.lvim.sinks[1].async = false -- HACK: Bug in structlog prevents setting async to false
structlog.configure(lvim_log)
local logger = structlog.get_logger "lvim"