feat: hide .. and fix maps

This commit is contained in:
s-prechtl 2024-09-21 13:38:20 +02:00
parent efee84967d
commit 58fa99335e

View file

@ -8,8 +8,26 @@ return {
config = function() config = function()
require('oil').setup { require('oil').setup {
use_default_keymaps = false, use_default_keymaps = false,
keymaps = {
["g?"] = "actions.show_help",
["<CR>"] = "actions.select",
["<C-p>"] = "actions.preview",
["<C-c>"] = "actions.close",
["<C-l>"] = "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 = { view_options = {
show_hidden = true, show_hidden = true,
is_always_hidden = function(name, bufnr)
return name == ".."
end
}, },
} }