feat: use ctrl-r to toggle between rootdir/cwd

This commit is contained in:
Folke Lemaitre
2024-06-10 20:44:13 +02:00
parent 9f98b0a01e
commit dd5a5fb4cd

View File

@ -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",