diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index b3834ab9..4236c073 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -63,6 +63,8 @@ return { end fix(defaults) + vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true }) + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, files = { @@ -73,11 +75,27 @@ return { }, }, grep = { + formatter = "path.hl", actions = { ["alt-i"] = { actions.toggle_ignore }, ["alt-h"] = { actions.toggle_hidden }, }, }, + formatters = { + path = { + hl = { + _to = function() + local _, escseq = require("fzf-lua.utils").ansi_from_hl("FzfLuaPath", "foo") + return [[ + return function(s, _, m) + return "]] .. (escseq or "") .. [[" + .. s .. m.utils.ansi_escseq.clear + end + ]] + end, + }, + }, + }, }) end, keys = {