feat: root-dir toggle

This commit is contained in:
Folke Lemaitre 2024-06-10 17:09:43 +02:00
parent 7eac9a854b
commit f9697cbf17
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

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