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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue