36 lines
1 KiB
Lua
36 lines
1 KiB
Lua
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",
|
|
["<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 = {
|
|
show_hidden = true,
|
|
is_always_hidden = function(name, bufnr)
|
|
return name == ".."
|
|
end
|
|
},
|
|
}
|
|
|
|
vim.keymap.set('n', '<leader>pv', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
|
|
end,
|
|
}
|