From 58fa99335ecaba4ad9cdc7fef0f1494d3cf7c60e Mon Sep 17 00:00:00 2001 From: s-prechtl Date: Sat, 21 Sep 2024 13:38:20 +0200 Subject: [PATCH] feat: hide .. and fix maps --- lua/custom/plugins/oil.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua index a6f697c..db9075b 100644 --- a/lua/custom/plugins/oil.lua +++ b/lua/custom/plugins/oil.lua @@ -8,8 +8,26 @@ return { config = function() require('oil').setup { use_default_keymaps = false, + keymaps = { + ["g?"] = "actions.show_help", + [""] = "actions.select", + [""] = "actions.preview", + [""] = "actions.close", + [""] = "actions.refresh", + ["-"] = "actions.parent", + ["_"] = "actions.open_cwd", + ["`"] = "actions.cd", + ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" }, + ["gs"] = "actions.change_sort", + ["gx"] = "actions.open_external", + ["g."] = "actions.toggle_hidden", + ["g\\"] = "actions.toggle_trash", + }, view_options = { show_hidden = true, + is_always_hidden = function(name, bufnr) + return name == ".." + end }, }