From bc2264a03e322f18831364ee7d0896f50a46e9bf Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 2 Mar 2023 14:24:16 +0100 Subject: [PATCH] Remove ugly colors from neovim fzf-lua tags --- home/programs/neovim.nix | 7 ++++- .../neovim/patches/fzf-lua-colors.patch | 30 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 home/programs/neovim/patches/fzf-lua-colors.patch diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix index eef9034..7c981da 100644 --- a/home/programs/neovim.nix +++ b/home/programs/neovim.nix @@ -214,7 +214,12 @@ in { } { - plugin = fzf-lua; + plugin = fzf-lua.overrideAttrs (old: { + patches = (old.patches or []) ++ [ + ./neovim/patches/fzf-lua-colors.patch + ]; + }); + type = "lua"; config = builtins.readFile(./neovim/plugins/fzf-lua.lua); } diff --git a/home/programs/neovim/patches/fzf-lua-colors.patch b/home/programs/neovim/patches/fzf-lua-colors.patch new file mode 100644 index 0000000..7c36161 --- /dev/null +++ b/home/programs/neovim/patches/fzf-lua-colors.patch @@ -0,0 +1,30 @@ +diff --git a/lua/fzf-lua/core.lua b/lua/fzf-lua/core.lua +index 28fd9d5..25baaf7 100644 +--- a/lua/fzf-lua/core.lua ++++ b/lua/fzf-lua/core.lua +@@ -572,7 +572,7 @@ M.set_header = function(opts, hdr_tbl) + cwd = { + hdr_txt_opt = "cwd_header", + hdr_txt_str = "cwd: ", +- hdr_txt_col = "red", ++ hdr_txt_col = "grey", + val = function() + -- do not display header when we're inside our + -- cwd unless the caller specifically requested +diff --git a/lua/fzf-lua/make_entry.lua b/lua/fzf-lua/make_entry.lua +index 45ab9fe..bd80f5d 100644 +--- a/lua/fzf-lua/make_entry.lua ++++ b/lua/fzf-lua/make_entry.lua +@@ -412,9 +412,9 @@ M.tag = function(x, opts) + line = line and #line > 0 and tonumber(line) + return ("%s%s: %s %s"):format( + M.file(file, opts), +- not line and "" or ":" .. utils.ansi_codes.green(tostring(line)), +- utils.ansi_codes.magenta(name), +- utils.ansi_codes.green(tag)) ++ not line and "" or ":" .. tostring(line), ++ utils.ansi_codes.blue(name), ++ utils.ansi_codes.clear(tag)) + , line + end +