From 0963118e60e0895e2e4842aeffc67cdf9e2bcd10 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Sat, 11 Nov 2023 18:09:59 -0800 Subject: fix: show more logs in ConformInfo when log level is TRACE --- lua/conform/health.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua/conform') 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 }) -- cgit v1.2.3-70-g09d2