29 lines
1.2 KiB
Lua
29 lines
1.2 KiB
Lua
return {
|
|
'stevearc/oil.nvim',
|
|
---@module 'oil'
|
|
---@type oil.SetupOpts
|
|
opts = {},
|
|
-- Optional dependencies
|
|
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
|
|
keymaps = {
|
|
['g?'] = { 'actions.show_help', mode = 'n' },
|
|
['<CR>'] = 'actions.select',
|
|
['<C-s>'] = { 'actions.select', opts = { vertical = true } },
|
|
-- ['<C-h>'] = { 'actions.select', opts = { horizontal = true } },
|
|
['<C-t>'] = { 'actions.select', opts = { tab = true } },
|
|
['<C-p>'] = 'actions.preview',
|
|
['<C-c>'] = { 'actions.close', mode = 'n' },
|
|
-- ['<C-l>'] = 'actions.refresh',
|
|
['-'] = { 'actions.parent', mode = 'n' },
|
|
['_'] = { 'actions.open_cwd', mode = 'n' },
|
|
['`'] = { 'actions.cd', mode = 'n' },
|
|
['~'] = { 'actions.cd', opts = { scope = 'tab' }, mode = 'n' },
|
|
['gs'] = { 'actions.change_sort', mode = 'n' },
|
|
['gx'] = 'actions.open_external',
|
|
['g.'] = { 'actions.toggle_hidden', mode = 'n' },
|
|
['g\\'] = { 'actions.toggle_trash', mode = 'n' },
|
|
},
|
|
vim.keymap.set('n', '<leader>o', '<CMD>Oil<CR>', { desc = 'Open parent directory' }),
|
|
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
|
|
}
|