From 000a7c2a4c4bda36f655f6489b5bac3211515a5d Mon Sep 17 00:00:00 2001 From: "eric.marin" Date: Wed, 18 Dec 2024 21:06:41 +0100 Subject: niri and fuzzel --- nvim/lua/plugins/oil.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'nvim/lua/plugins/oil.lua') 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, }) -- cgit v1.2.3