diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 04f87f9a..5abb93a2 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -36,6 +36,15 @@ return { -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + -- Toggle root dir / cwd + config.defaults.actions.files["alt-c"] = function(_, ctx) + local o = vim.deepcopy(ctx.__call_opts) + o.root = o.root == false + o.cwd = nil + o.buf = ctx.__CTX.bufnr + LazyVim.pick.open(ctx.__INFO.cmd, o) + end + return { [1] = "default-title", fzf_colors = true,