40 lines
949 B
Lua
40 lines
949 B
Lua
return {
|
|
'stevearc/oil.nvim',
|
|
---@module 'oil'
|
|
---@type oil.SetupOpts
|
|
opts = {
|
|
|
|
default_file_explorer = true,
|
|
delete_to_trash = true,
|
|
skip_confirm_for_simple_edits = true,
|
|
|
|
float = {
|
|
padding = 2,
|
|
max_width = 90,
|
|
max_height = 0,
|
|
},
|
|
win_options = {
|
|
wrap = true,
|
|
winblend = 0,
|
|
},
|
|
keymaps = {
|
|
['<C-c>'] = false,
|
|
['<esc><esc>'] = 'actions.close',
|
|
},
|
|
view_options = {
|
|
show_hidden = true,
|
|
natural_order = true,
|
|
is_always_hidden = function(name, _)
|
|
return name == '..' or name == '.git'
|
|
end,
|
|
},
|
|
},
|
|
-- Optional dependencies
|
|
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
|
|
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
|
|
lazy = false,
|
|
init = function()
|
|
vim.keymap.set('n', '-', '<CMD>Oil --float<CR>', { desc = 'Open parent directory' })
|
|
end,
|
|
}
|