return { 'stevearc/oil.nvim', opts = {}, dependencies = { 'nvim-tree/nvim-web-devicons', opts = {}, }, 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 }, } vim.keymap.set('n', 'pv', 'Oil', { desc = 'Open parent directory' }) end, }