feat(oil): show file details with gd
This commit is contained in:
parent
084f94dba1
commit
573acef481
1 changed files with 12 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ return {
|
|||
lazy = true,
|
||||
cmd = "Oil",
|
||||
config = function()
|
||||
local detail = false
|
||||
require("oil").setup({
|
||||
default_file_explorer = true,
|
||||
columns = {
|
||||
|
|
@ -23,6 +24,17 @@ return {
|
|||
["<C-c>"] = "actions.close",
|
||||
["q"] = "actions.close",
|
||||
["<Esc>"] = "actions.close",
|
||||
["gd"] = {
|
||||
desc = "Toggle file detail view",
|
||||
callback = function()
|
||||
detail = not detail
|
||||
if detail then
|
||||
require("oil").set_columns({ "icon", "permissions", "size", "mtime" })
|
||||
else
|
||||
require("oil").set_columns({ "icon" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
float = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue