feat: Use <C-l> to refresh directory (#7)
This commit is contained in:
parent
1879339442
commit
d019d38a3e
2 changed files with 14 additions and 0 deletions
|
|
@ -84,4 +84,17 @@ M.toggle_hidden = {
|
|||
end,
|
||||
}
|
||||
|
||||
M.refresh = {
|
||||
desc = "Refresh directory",
|
||||
callback = function()
|
||||
if vim.bo.modified then
|
||||
local ok, choice = pcall(vim.fn.confirm, "Discard changes?", "No\nYes")
|
||||
if not ok or choice ~= 2 then
|
||||
return
|
||||
end
|
||||
end
|
||||
vim.cmd.edit({ bang = true })
|
||||
end,
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ local default_config = {
|
|||
["<C-h>"] = "actions.select_split",
|
||||
["<C-p>"] = "actions.preview",
|
||||
["<C-c>"] = "actions.close",
|
||||
["<C-l>"] = "actions.refresh",
|
||||
["-"] = "actions.parent",
|
||||
["_"] = "actions.open_cwd",
|
||||
["`"] = "actions.cd",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue