From dd5a5fb4cd8aca1e5dba1677010efd182297f7c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Jun 2024 20:44:13 +0200 Subject: [PATCH] feat: use `ctrl-r` to toggle between rootdir/cwd --- lua/lazyvim/plugins/extras/editor/fzf.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 9fbb98d4..dcea3b5f 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -42,13 +42,14 @@ return { config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open -- Toggle root dir / cwd - config.defaults.actions.files["alt-c"] = function(_, ctx) + config.defaults.actions.files["ctrl-r"] = 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 + config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] return { [1] = "default-title",