mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-29 20:14:36 +02:00
feat: root-dir toggle
This commit is contained in:
parent
7eac9a854b
commit
f9697cbf17
1 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue