aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/health.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-11-11 18:09:59 -0800
committerSteven Arcangeli <stevearc@stevearc.com>2023-11-11 18:09:59 -0800
commit0963118e60e0895e2e4842aeffc67cdf9e2bcd10 (patch)
treea2e15aea47993ad65aae069b2f59ee5861bb7e2f /lua/conform/health.lua
parente388bd6725d83f83639e24482b9d1bca01c0c040 (diff)
fix: show more logs in ConformInfo when log level is TRACE
Diffstat (limited to 'lua/conform/health.lua')
-rw-r--r--lua/conform/health.lua7
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 })