feat: root-dir toggle
This commit is contained in:
1 file changed
+9
@@ -36,6 +36,15 @@ return {
|
|||||||
-- Trouble
|
-- Trouble
|
||||||
config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open
|
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 {
|
return {
|
||||||
[1] = "default-title",
|
[1] = "default-title",
|
||||||
fzf_colors = true,
|
fzf_colors = true,
|
||||||
|
|||||||
Reference in new issue
Block a user