diff options
| author | mirenn <me@mirenn.dev> | 2024-12-18 21:06:41 +0100 |
|---|---|---|
| committer | mirenn <me@mirenn.dev> | 2024-12-18 21:06:41 +0100 |
| commit | 70a25f93a0b52aec897fb2caf9d191876ff2094a (patch) | |
| tree | 8a5fe85f0632fcca678f0204a4288e6b3423f772 /nvim/lua/plugins/oil.lua | |
| parent | 48619661ef8fb16704d8beff25e5dfce7b86c6eb (diff) | |
| download | dotfiles-70a25f93a0b52aec897fb2caf9d191876ff2094a.tar.gz dotfiles-70a25f93a0b52aec897fb2caf9d191876ff2094a.zip | |
niri and fuzzel
Diffstat (limited to 'nvim/lua/plugins/oil.lua')
| -rw-r--r-- | nvim/lua/plugins/oil.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nvim/lua/plugins/oil.lua b/nvim/lua/plugins/oil.lua index e717988..c19baad 100644 --- a/nvim/lua/plugins/oil.lua +++ b/nvim/lua/plugins/oil.lua @@ -4,9 +4,8 @@ local init = function() { noremap = true, silent = true, desc = "File browser (Oil)" }) -- Oil end - - local config = function() + local detail = false require("oil").setup({ default_file_explorer = true, delete_to_trash = true, @@ -23,6 +22,17 @@ local config = function() ["bs"] = "actions.change_sort", ["b."] = "actions.toggle_hidden", ["bt"] = "actions.toggle_trash", + ["bd"] = { + 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, + }, }, use_default_keymaps = false, }) |
