diff options
Diffstat (limited to 'lua/lvim')
| -rw-r--r-- | lua/lvim/core/log.lua | 6 | ||||
| -rw-r--r-- | lua/lvim/impatient.lua | 4 | ||||
| -rw-r--r-- | lua/lvim/plugins.lua | 2 | 
3 files changed, 8 insertions, 4 deletions
| diff --git a/lua/lvim/core/log.lua b/lua/lvim/core/log.lua index d0e74f18..15ccb11c 100644 --- a/lua/lvim/core/log.lua +++ b/lua/lvim/core/log.lua @@ -1,7 +1,5 @@  local Log = {} -local logfile = string.format("%s/%s.log", get_cache_dir(), "lvim") -  Log.levels = {    TRACE = 1,    DEBUG = 2, @@ -39,7 +37,7 @@ function Log:init()              { level = structlog.formatters.FormatColorizer.color_level() }            ),          }), -        structlog.sinks.File(log_level, logfile, { +        structlog.sinks.File(log_level, self:get_path(), {            processors = {              structlog.processors.Namer(),              structlog.processors.StackWriter({ "line", "file" }, { max_parents = 3, stack_level = 2 }), @@ -155,7 +153,7 @@ end  ---Retrieves the path of the logfile  ---@return string path of the logfile  function Log:get_path() -  return logfile +  return string.format("%s/%s.log", get_cache_dir(), "lvim")  end  ---Add a log entry at TRACE level diff --git a/lua/lvim/impatient.lua b/lua/lvim/impatient.lua index 4fdc0026..230e5195 100644 --- a/lua/lvim/impatient.lua +++ b/lua/lvim/impatient.lua @@ -203,6 +203,10 @@ function M.update_reduced_rtp()  end  local function load_package_with_cache_reduced_rtp(name) +  if vim.in_fast_event() then +    -- Can't set/get options in the fast handler +    return load_package_with_cache(name, "fast") +  end    local orig_rtp = get_option "runtimepath"    local orig_ei = get_option "eventignore" diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index 29620009..f5b9914c 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -190,6 +190,7 @@ local core_plugins = {      config = function()        require("lvim.core.bufferline").setup()      end, +    branch = "main",      event = "BufWinEnter",      disable = not lvim.builtin.bufferline.active,    }, @@ -225,6 +226,7 @@ local core_plugins = {    {      "akinsho/toggleterm.nvim",      event = "BufWinEnter", +    branch = "main",      config = function()        require("lvim.core.terminal").setup()      end, | 
