Skip to content

Commit 06ec2a2

Browse files
committed
fix(colored_printer): deprecated call and incomplete highlight
Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
1 parent 649488e commit 06ec2a2

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

lua/quicktest/colored_printer.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ function ColoredPrinter:setup_highlight_groups()
128128
end
129129

130130
-- Use Normal highlight group directly to ensure proper default colors
131-
vim.cmd("highlight default QuicktestAnsiColorDefault guifg=NONE guibg=NONE")
132-
api.nvim_set_hl(0, "QuicktestAnsiColorDefault", { link = "Normal" })
131+
api.nvim_set_hl(0, "QuicktestAnsiColorDefault", { default = true, fg = "NONE", bg = "NONE" })
132+
api.nvim_set_hl(0, "QuicktestAnsiColorDefault", { default = true, link = "Normal" })
133+
-- vim.cmd("highlight default QuicktestAnsiColorDefault guifg=NONE guibg=NONE")
133134
-- vim.cmd("highlight default link QuicktestAnsiColorDefault Normal")
134135
self.color_groups["default"] = "QuicktestAnsiColorDefault"
135136
end

lua/quicktest/module.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,7 @@ function M.run(adapter, params, config, opts)
289289
end
290290

291291
for i, _ in ipairs(errored_lines) do
292-
vim.highlight.range(
293-
buf,
294-
stderr_ns,
295-
"DiagnosticError",
296-
{ i + lines_count - 2, 0 },
297-
{ i + lines_count - 2, -1 }
298-
)
292+
vim.hl.range(buf, stderr_ns, "DiagnosticError", { i + lines_count - 2, 0 }, { i + lines_count - 2, -1 })
299293
end
300294

301295
print_buf_status(buf, lines_count + new_lines_count)

0 commit comments

Comments
 (0)