diff options
author | Steven Arcangeli <stevearc@stevearc.com> | 2023-11-11 18:09:59 -0800 |
---|---|---|
committer | Steven Arcangeli <stevearc@stevearc.com> | 2023-11-11 18:09:59 -0800 |
commit | 0963118e60e0895e2e4842aeffc67cdf9e2bcd10 (patch) | |
tree | a2e15aea47993ad65aae069b2f59ee5861bb7e2f | |
parent | e388bd6725d83f83639e24482b9d1bca01c0c040 (diff) |
fix: show more logs in ConformInfo when log level is TRACE
-rw-r--r-- | lua/conform/health.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/conform/health.lua b/lua/conform/health.lua index 3a1c9f6..bf7f51c 100644 --- a/lua/conform/health.lua +++ b/lua/conform/health.lua @@ -87,7 +87,12 @@ M.show_window = function() if vim.fn.filereadable(logfile) == 1 then local f = io.open(logfile, "r") if f then - f:seek("end", -1024) + local context = -1024 + -- Show more logs if the log level is set to trace. + if log.level == vim.log.levels.TRACE then + context = 3 * context + end + f:seek("end", context) local text = f:read("*a") f:close() local log_lines = vim.split(text, "\n", { plain = true, trimempty = true }) |