From b2f70ec46ac045ce1350ef1e1d058b33e823f321 Mon Sep 17 00:00:00 2001 From: Davincible Date: Fri, 4 Nov 2022 15:51:10 +0100 Subject: [PATCH 1/8] feat: improve colored output --- lua/neotest-go/color.lua | 126 +++++++++++++++++++++++++++++++++--- lua/neotest-go/patterns.lua | 8 +++ 2 files changed, 126 insertions(+), 8 deletions(-) diff --git a/lua/neotest-go/color.lua b/lua/neotest-go/color.lua index 1d422a5..663da23 100644 --- a/lua/neotest-go/color.lua +++ b/lua/neotest-go/color.lua @@ -1,16 +1,126 @@ local M = {} --- Highlight some parts of the test output -function M.highlight_output(output) +local fmt = string.format +local colors_patterns = require("neotest-go.patterns").colors + +local term = os.getenv("COLORTERM") +local fullcolor = (term == "truecolor") or (term == "24bit") + +local function slice(tbl, first, last, step) + local sliced = {} + for i = first or 1, last or #tbl, step or 1 do + sliced[#sliced + 1] = tbl[i] + end + return sliced +end + +-- Function: HEXtoRGB(arg) +-- Argument: Hex string value in the form '#cccccc' or 'cccccc' +-- HEX shorthand is supported +-- Returns: Three RGB values +-- Red value from 0-255 +-- Green value from 0-255 +-- Blue value from 0-255 +-- Source: forum.rainmeter.net/viewtopic.php?t=29419 +local function HEXtoRGB(hexArg) + hexArg = hexArg:gsub("#", "") + if string.len(hexArg) == 3 then + return tonumber("0x" .. hexArg:sub(1, 1)) * 17, + tonumber("0x" .. hexArg:sub(2, 2)) * 17, + tonumber("0x" .. hexArg:sub(3, 3)) * 17 + elseif string.len(hexArg) == 6 then + return tonumber("0x" .. hexArg:sub(1, 2)), + tonumber("0x" .. hexArg:sub(3, 4)), + tonumber("0x" .. hexArg:sub(5, 6)) + else + return 0, 0, 0 + end +end + +-- Get color from config, of default if not present in config. +-- @param config {} +-- @param section string +-- @param color_class string +-- @return string +local function get_color(config, section, index, color_class) + local color = colors_patterns[section][color_class] + if + config[section] ~= nil + or config[section][color_class] ~= nil and #config[section][color_class] ~= 0 + then + color = config[section][color_class] + end + if type(color) ~= "table" then + return color + end + return color[index] +end + +-- Add 24bit console color to a line. +-- @param line string +-- @param hex_color string +-- @return string +local function add_24bit_color(line, hex_color) + local r, g, b = HEXtoRGB(hex_color) + local start_code = fmt("[38;2;%d;%d;%dm", r, g, b) + local end_code = "" + return start_code .. line .. end_code +end + +-- Add 8bit term color to a line. +--@param line string +--@param color string +--@return string +local function add_8bit_color(line, color) + local start_code = fmt("[%dm", color) + local end_code = "" + return start_code .. line .. end_code +end + +-- Colorize a line. +-- @param line string +-- @param config table +-- @param section string +-- @return string +-- colorized = add_color(name, match_group, config, i) +local function add_color(section, line, config, i) + if fullcolor then + local color = get_color(config, section, i, "gui") + return add_24bit_color(line, color) + end + local color = get_color(config, section, i, "term") + return add_8bit_color(line, color) +end + +local function is_table(a) + return type(a) == "table" +end + +-- Highlight output. +-- @param output string +-- @param config table +-- @return string +function M.highlight_output(output, opts) if not output then return output end - if string.find(output, "FAIL") then - output = output:gsub("^", ""):gsub("$", "") - elseif string.find(output, "PASS") then - output = output:gsub("^", ""):gsub("$", "") - elseif string.find(output, "SKIP") then - output = output:gsub("^", ""):gsub("$", "") + -- Fetch patterns + local config = colors_patterns + if is_table(opts) and opts.colors ~= nil then + config = opts.colors + end + -- Itterate over all patterns to colorize + for name, c in pairs(colors_patterns) do + local res = { string.find(output, c.pattern) } + if #res > 2 then + -- Colorize all groups in pattern + for i, match_group in ipairs(slice(res, 3)) do + local colorized = add_color(name, match_group, config, i) + output = string.gsub(output, match_group, colorized) + end + elseif #res > 0 then + output = add_color(name, output, config) + end end return output end diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index 5987073..5f0f695 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -2,6 +2,14 @@ local patterns = { testfile = "^%s%s%s%s(.*_test.go):(%d+): ", testlog = "^%s%s%s%s%s%s%s%s", error = { "error" }, + -- Patterns to colorize in output + colors = { + run = { pattern = "(===%s+RUN)%s+(.*)", gui = { "#777777", "#deb887" }, term = { 34, 34 } }, + file = { pattern = "^%s+(.*.go):(%d+):", gui = { "#20b2aa", "#a474dc" }, term = { 36, 35 } }, + pass = { pattern = "^---%s+PASS:", gui = "#14D000", term = 31 }, + fail = { pattern = "^---%s+FAIL:", gui = "#cc0000", term = 32 }, + skip = { pattern = "^---%s+SKIP:", gui = "#729fcf", term = 33 }, + }, } return patterns From 7b8c59e192747d36bb9d1125f0dd936db4134974 Mon Sep 17 00:00:00 2001 From: Davincible Date: Fri, 4 Nov 2022 15:58:32 +0100 Subject: [PATCH 2/8] small pattern improvement --- lua/neotest-go/patterns.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index 5f0f695..6e9e460 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -4,8 +4,8 @@ local patterns = { error = { "error" }, -- Patterns to colorize in output colors = { - run = { pattern = "(===%s+RUN)%s+(.*)", gui = { "#777777", "#deb887" }, term = { 34, 34 } }, - file = { pattern = "^%s+(.*.go):(%d+):", gui = { "#20b2aa", "#a474dc" }, term = { 36, 35 } }, + run = { pattern = "^(===%s+RUN)%s+(.*)", gui = { "#777777", "#deb887" }, term = { 34, 34 } }, + file = { pattern = "^%s+(.*.go)(:%d+):", gui = { "#20b2aa", "#a474dc" }, term = { 36, 35 } }, pass = { pattern = "^---%s+PASS:", gui = "#14D000", term = 31 }, fail = { pattern = "^---%s+FAIL:", gui = "#cc0000", term = 32 }, skip = { pattern = "^---%s+SKIP:", gui = "#729fcf", term = 33 }, From e22f3123b88f9aec0fb38d42a84369ed48e8b36b Mon Sep 17 00:00:00 2001 From: Davincible Date: Fri, 4 Nov 2022 15:59:46 +0100 Subject: [PATCH 3/8] fix comment --- lua/neotest-go/color.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/neotest-go/color.lua b/lua/neotest-go/color.lua index 663da23..42e8868 100644 --- a/lua/neotest-go/color.lua +++ b/lua/neotest-go/color.lua @@ -82,7 +82,6 @@ end -- @param config table -- @param section string -- @return string --- colorized = add_color(name, match_group, config, i) local function add_color(section, line, config, i) if fullcolor then local color = get_color(config, section, i, "gui") From cee07babb76c081451c2ef3391b0ba11489f2976 Mon Sep 17 00:00:00 2001 From: Davincible Date: Fri, 4 Nov 2022 16:57:46 +0100 Subject: [PATCH 4/8] feat: add testify coloring --- lua/neotest-go/patterns.lua | 56 +++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index 6e9e460..a3550a7 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -1,14 +1,60 @@ +local termcolors = { + black = 30, + red = 31, + green = 32, + yellow = 33, + blue = 34, + magenta = 35, + cyan = 36, + white = 37, +} + +local guicolors = { + pass = "#14D000", + fail = "#cc0000", + skip = "#729fcf", + file_name = "#20b2aa", + file_number = "#a474dc", + background = "#777777", + test_name = "#deb887", +} + local patterns = { testfile = "^%s%s%s%s(.*_test.go):(%d+): ", testlog = "^%s%s%s%s%s%s%s%s", error = { "error" }, -- Patterns to colorize in output colors = { - run = { pattern = "^(===%s+RUN)%s+(.*)", gui = { "#777777", "#deb887" }, term = { 34, 34 } }, - file = { pattern = "^%s+(.*.go)(:%d+):", gui = { "#20b2aa", "#a474dc" }, term = { 36, 35 } }, - pass = { pattern = "^---%s+PASS:", gui = "#14D000", term = 31 }, - fail = { pattern = "^---%s+FAIL:", gui = "#cc0000", term = 32 }, - skip = { pattern = "^---%s+SKIP:", gui = "#729fcf", term = 33 }, + run = { + pattern = "^(===%s+RUN)%s+(.*)", + gui = { guicolors.background, guicolors.test_name }, + term = { termcolors.blue, termcolors.blue }, + }, + file = { + pattern = "^%s+(.*.go)(:%d+):", + gui = { guicolors.file_name, guicolors.file_number }, + term = { termcolors.cyan, termcolors.magenta }, + }, + pass = { pattern = "^---%s+PASS:", gui = guicolors.pass, term = termcolors.red }, + fail = { pattern = "^---%s+FAIL:", gui = guicolors.fail, term = termcolors.green }, + skip = { pattern = "^---%s+SKIP:", gui = guicolors.skip, term = termcolors.yellow }, + + -- Color erorr messages from github.com/stretchr/testify + testify_error_trace = { + pattern = "^%s+(Error Trace:)%s+(.*)", + gui = { guicolors.background, guicolors.background }, + term = { termcolors.yellow, termcolors.blue }, + }, + testify_error = { + pattern = "^%s+(Error:)%s+(.*)", + gui = { guicolors.fail, guicolors.fail }, + term = { termcolors.yellow, termcolors.yellow }, + }, + testify_test = { + pattern = "^%s+(Test:)%s+(.*)", + gui = { guicolors.background, guicolors.test_name }, + term = { termcolors.blue, termcolors.blue }, + }, }, } From f4d1bceb858af73d78442e134b62107dc2141b81 Mon Sep 17 00:00:00 2001 From: Davincible Date: Fri, 4 Nov 2022 23:09:28 +0100 Subject: [PATCH 5/8] add more color patterns --- lua/neotest-go/color.lua | 13 +++++++- lua/neotest-go/patterns.lua | 59 ++++++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/lua/neotest-go/color.lua b/lua/neotest-go/color.lua index 42e8868..9d594c2 100644 --- a/lua/neotest-go/color.lua +++ b/lua/neotest-go/color.lua @@ -14,6 +14,17 @@ local function slice(tbl, first, last, step) return sliced end +---Escape characters that have a special meaning in patterns +---@param text string +---@return string +local function escape(text) + local special_chars = { "(", ")", "%", ".", "+", "-", "*", "[", "?", "^", "$" } + for _, char in pairs(special_chars) do + text = text:gsub("%" .. char, "%%" .. char) + end + return text +end + -- Function: HEXtoRGB(arg) -- Argument: Hex string value in the form '#cccccc' or 'cccccc' -- HEX shorthand is supported @@ -115,7 +126,7 @@ function M.highlight_output(output, opts) -- Colorize all groups in pattern for i, match_group in ipairs(slice(res, 3)) do local colorized = add_color(name, match_group, config, i) - output = string.gsub(output, match_group, colorized) + output = string.gsub(output, escape(match_group), escape(colorized)) end elseif #res > 0 then output = add_color(name, output, config) diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index a3550a7..70d0da1 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -10,13 +10,14 @@ local termcolors = { } local guicolors = { - pass = "#14D000", - fail = "#cc0000", - skip = "#729fcf", - file_name = "#20b2aa", - file_number = "#a474dc", - background = "#777777", - test_name = "#deb887", + green = "#14D000", + red = "#cc0000", + dark_blue = "#729fcf", + cyan = "#20b2aa", + magenta = "#a474dc", + grey = "#777777", + yellow = "#deb887", + orange = "#ff7373", } local patterns = { @@ -25,34 +26,58 @@ local patterns = { error = { "error" }, -- Patterns to colorize in output colors = { + pass = { pattern = "^---%s+PASS:", gui = guicolors.green, term = termcolors.red }, + fail = { pattern = "^---%s+FAIL:", gui = guicolors.red, term = termcolors.green }, + skip = { pattern = "^---%s+SKIP:", gui = guicolors.dark_blue, term = termcolors.yellow }, run = { pattern = "^(===%s+RUN)%s+(.*)", - gui = { guicolors.background, guicolors.test_name }, + gui = { guicolors.grey, guicolors.yellow }, term = { termcolors.blue, termcolors.blue }, }, + signal = { + pattern = "^(%[signal)%s(.*)(:.*%])", + gui = { guicolors.grey, guicolors.dark_blue, guicolors.grey }, + term = { termcolors.blue, termcolors.red, termcolors.blue }, + }, + panic = { + pattern = "^%s+(panic:)%s+(.*)", + gui = { guicolors.red, guicolors.orange }, + term = { termcolors.red, termcolors.red }, + }, + panic_recovered = { + pattern = "^(panic:)%s+(.*)%s(%[.*%])", + gui = { guicolors.red, guicolors.orange, guicolors.dark_blue }, + term = { termcolors.red, termcolors.red, termcolors.blue }, + }, + go_routine = { + pattern = "^(goroutine)%s(%d+)%s(%[.*])(:)", + gui = { guicolors.grey, guicolors.magenta, guicolors.dark_blue, guicolors.grey }, + term = { termcolors.blue, termcolors.blue, termcolors.magenta, termcolors.blue }, + }, file = { - pattern = "^%s+(.*.go)(:%d+):", - gui = { guicolors.file_name, guicolors.file_number }, + pattern = "^%s+(.*.go)(:%d+)", + gui = { guicolors.cyan, guicolors.magenta }, term = { termcolors.cyan, termcolors.magenta }, }, - pass = { pattern = "^---%s+PASS:", gui = guicolors.pass, term = termcolors.red }, - fail = { pattern = "^---%s+FAIL:", gui = guicolors.fail, term = termcolors.green }, - skip = { pattern = "^---%s+SKIP:", gui = guicolors.skip, term = termcolors.yellow }, - + file_panic = { + pattern = "^%s+(.*.go)(:%d+)%s+(%+0x%w+)", + gui = { guicolors.cyan, guicolors.magenta, guicolors.grey }, + term = { termcolors.cyan, termcolors.magenta, termcolors.blue }, + }, -- Color erorr messages from github.com/stretchr/testify testify_error_trace = { pattern = "^%s+(Error Trace:)%s+(.*)", - gui = { guicolors.background, guicolors.background }, + gui = { guicolors.grey, guicolors.grey }, term = { termcolors.yellow, termcolors.blue }, }, testify_error = { pattern = "^%s+(Error:)%s+(.*)", - gui = { guicolors.fail, guicolors.fail }, + gui = { guicolors.red, guicolors.red }, term = { termcolors.yellow, termcolors.yellow }, }, testify_test = { pattern = "^%s+(Test:)%s+(.*)", - gui = { guicolors.background, guicolors.test_name }, + gui = { guicolors.grey, guicolors.yellow }, term = { termcolors.blue, termcolors.blue }, }, }, From f963d291e26e28d012fd2f528650f86def4b69e8 Mon Sep 17 00:00:00 2001 From: Davincible Date: Mon, 7 Nov 2022 00:04:16 +0100 Subject: [PATCH 6/8] make pass color pattern more flexible --- lua/neotest-go/patterns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index 70d0da1..b35879b 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -26,7 +26,7 @@ local patterns = { error = { "error" }, -- Patterns to colorize in output colors = { - pass = { pattern = "^---%s+PASS:", gui = guicolors.green, term = termcolors.red }, + pass = { pattern = "^%s*---%s+PASS:", gui = guicolors.green, term = termcolors.red }, fail = { pattern = "^---%s+FAIL:", gui = guicolors.red, term = termcolors.green }, skip = { pattern = "^---%s+SKIP:", gui = guicolors.dark_blue, term = termcolors.yellow }, run = { From c7792dbc504e5ddf223250a3a9c312066eb035d8 Mon Sep 17 00:00:00 2001 From: Davincible Date: Mon, 7 Nov 2022 01:52:34 +0100 Subject: [PATCH 7/8] add build message coloring --- lua/neotest-go/patterns.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index b35879b..ec7f34e 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -29,6 +29,8 @@ local patterns = { pass = { pattern = "^%s*---%s+PASS:", gui = guicolors.green, term = termcolors.red }, fail = { pattern = "^---%s+FAIL:", gui = guicolors.red, term = termcolors.green }, skip = { pattern = "^---%s+SKIP:", gui = guicolors.dark_blue, term = termcolors.yellow }, + build = { pattern = "^===%s+BUILD", gui = guicolors.yellow, term = termcolors.yellow }, + comment = { pattern = "^#", gui = guicolors.grey, term = termcolors.blue }, run = { pattern = "^(===%s+RUN)%s+(.*)", gui = { guicolors.grey, guicolors.yellow }, @@ -59,6 +61,11 @@ local patterns = { gui = { guicolors.cyan, guicolors.magenta }, term = { termcolors.cyan, termcolors.magenta }, }, + file_column = { + pattern = "^%s*(.*.go)(:%d+)(:%d+)", + gui = { guicolors.cyan, guicolors.magenta, guicolors.dark_blue }, + term = { termcolors.cyan, termcolors.magenta, termcolors.blue }, + }, file_panic = { pattern = "^%s+(.*.go)(:%d+)%s+(%+0x%w+)", gui = { guicolors.cyan, guicolors.magenta, guicolors.grey }, From 699ae2fb1fc32942333e9c96e3f8fd8d73c2dfac Mon Sep 17 00:00:00 2001 From: Davincible Date: Mon, 7 Nov 2022 15:25:17 +0100 Subject: [PATCH 8/8] fix comments --- lua/neotest-go/color.lua | 33 +++++++-------------------------- lua/neotest-go/patterns.lua | 16 ++++++++-------- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/lua/neotest-go/color.lua b/lua/neotest-go/color.lua index 9d594c2..6d99a30 100644 --- a/lua/neotest-go/color.lua +++ b/lua/neotest-go/color.lua @@ -6,26 +6,7 @@ local colors_patterns = require("neotest-go.patterns").colors local term = os.getenv("COLORTERM") local fullcolor = (term == "truecolor") or (term == "24bit") -local function slice(tbl, first, last, step) - local sliced = {} - for i = first or 1, last or #tbl, step or 1 do - sliced[#sliced + 1] = tbl[i] - end - return sliced -end - ----Escape characters that have a special meaning in patterns ----@param text string ----@return string -local function escape(text) - local special_chars = { "(", ")", "%", ".", "+", "-", "*", "[", "?", "^", "$" } - for _, char in pairs(special_chars) do - text = text:gsub("%" .. char, "%%" .. char) - end - return text -end - --- Function: HEXtoRGB(arg) +-- Function: hex_to_rgb(arg) -- Argument: Hex string value in the form '#cccccc' or 'cccccc' -- HEX shorthand is supported -- Returns: Three RGB values @@ -33,7 +14,7 @@ end -- Green value from 0-255 -- Blue value from 0-255 -- Source: forum.rainmeter.net/viewtopic.php?t=29419 -local function HEXtoRGB(hexArg) +local function hex_to_rgb(hexArg) hexArg = hexArg:gsub("#", "") if string.len(hexArg) == 3 then return tonumber("0x" .. hexArg:sub(1, 1)) * 17, @@ -72,7 +53,7 @@ end -- @param hex_color string -- @return string local function add_24bit_color(line, hex_color) - local r, g, b = HEXtoRGB(hex_color) + local r, g, b = hex_to_rgb(hex_color) local start_code = fmt("[38;2;%d;%d;%dm", r, g, b) local end_code = "" return start_code .. line .. end_code @@ -119,14 +100,14 @@ function M.highlight_output(output, opts) if is_table(opts) and opts.colors ~= nil then config = opts.colors end - -- Itterate over all patterns to colorize + -- Iterate over all patterns to colorize for name, c in pairs(colors_patterns) do - local res = { string.find(output, c.pattern) } + local res = { output:find(c.pattern) } if #res > 2 then -- Colorize all groups in pattern - for i, match_group in ipairs(slice(res, 3)) do + for i, match_group in ipairs(vim.list_slice(res, 3)) do local colorized = add_color(name, match_group, config, i) - output = string.gsub(output, escape(match_group), escape(colorized)) + output = output:gsub(vim.pesc(match_group), vim.pesc(colorized)) end elseif #res > 0 then output = add_color(name, output, config) diff --git a/lua/neotest-go/patterns.lua b/lua/neotest-go/patterns.lua index ec7f34e..b2cdc99 100644 --- a/lua/neotest-go/patterns.lua +++ b/lua/neotest-go/patterns.lua @@ -12,7 +12,7 @@ local termcolors = { local guicolors = { green = "#14D000", red = "#cc0000", - dark_blue = "#729fcf", + blue = "#729fcf", cyan = "#20b2aa", magenta = "#a474dc", grey = "#777777", @@ -28,9 +28,9 @@ local patterns = { colors = { pass = { pattern = "^%s*---%s+PASS:", gui = guicolors.green, term = termcolors.red }, fail = { pattern = "^---%s+FAIL:", gui = guicolors.red, term = termcolors.green }, - skip = { pattern = "^---%s+SKIP:", gui = guicolors.dark_blue, term = termcolors.yellow }, + skip = { pattern = "^---%s+SKIP:", gui = guicolors.blue, term = termcolors.yellow }, build = { pattern = "^===%s+BUILD", gui = guicolors.yellow, term = termcolors.yellow }, - comment = { pattern = "^#", gui = guicolors.grey, term = termcolors.blue }, + comment = { pattern = "^%s*#", gui = guicolors.grey, term = termcolors.blue }, run = { pattern = "^(===%s+RUN)%s+(.*)", gui = { guicolors.grey, guicolors.yellow }, @@ -38,7 +38,7 @@ local patterns = { }, signal = { pattern = "^(%[signal)%s(.*)(:.*%])", - gui = { guicolors.grey, guicolors.dark_blue, guicolors.grey }, + gui = { guicolors.grey, guicolors.blue, guicolors.grey }, term = { termcolors.blue, termcolors.red, termcolors.blue }, }, panic = { @@ -48,12 +48,12 @@ local patterns = { }, panic_recovered = { pattern = "^(panic:)%s+(.*)%s(%[.*%])", - gui = { guicolors.red, guicolors.orange, guicolors.dark_blue }, + gui = { guicolors.red, guicolors.orange, guicolors.blue }, term = { termcolors.red, termcolors.red, termcolors.blue }, }, go_routine = { pattern = "^(goroutine)%s(%d+)%s(%[.*])(:)", - gui = { guicolors.grey, guicolors.magenta, guicolors.dark_blue, guicolors.grey }, + gui = { guicolors.grey, guicolors.magenta, guicolors.blue, guicolors.grey }, term = { termcolors.blue, termcolors.blue, termcolors.magenta, termcolors.blue }, }, file = { @@ -63,7 +63,7 @@ local patterns = { }, file_column = { pattern = "^%s*(.*.go)(:%d+)(:%d+)", - gui = { guicolors.cyan, guicolors.magenta, guicolors.dark_blue }, + gui = { guicolors.cyan, guicolors.magenta, guicolors.blue }, term = { termcolors.cyan, termcolors.magenta, termcolors.blue }, }, file_panic = { @@ -71,7 +71,7 @@ local patterns = { gui = { guicolors.cyan, guicolors.magenta, guicolors.grey }, term = { termcolors.cyan, termcolors.magenta, termcolors.blue }, }, - -- Color erorr messages from github.com/stretchr/testify + -- Color error messages from github.com/stretchr/testify testify_error_trace = { pattern = "^%s+(Error Trace:)%s+(.*)", gui = { guicolors.grey, guicolors.grey },