From 7583b40fdeec2957b7c8e27011ab271f8430cd86 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Fri, 13 May 2022 17:37:07 -0700 Subject: [PATCH] feat: add styling support for the `--color` option (closes #413) --- lua/fzf-lua/core.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/fzf-lua/core.lua b/lua/fzf-lua/core.lua index d52428c..8fb59f3 100644 --- a/lua/fzf-lua/core.lua +++ b/lua/fzf-lua/core.lua @@ -222,6 +222,12 @@ M.create_fzf_colors = function(colors) if col then table.insert(tbl, ("%s:%s"):format(highlight, col)) end + -- arguments in the 3nd slot onward are passed raw, this can + -- be used to pass styling arguments, for more info see #413 + -- https://github.com/junegunn/fzf/issues/1663 + for i = 3, #list do + table.insert(tbl, ("%s:%s"):format(highlight, list[i])) + end end return string.format("--color=%s", table.concat(tbl, ","))