Skip to content

Commit 2b754cc

Browse files
author
Joshua Molloy
committed
feat: added oil
1 parent c18f9a1 commit 2b754cc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

lua/custom/plugins/oil.lua

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
return {
2+
{
3+
'stevearc/oil.nvim',
4+
---@module 'oil'
5+
---@type oil.SetupOpts
6+
opts = {},
7+
-- Optional dependencies
8+
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
9+
-- dependencies = { 'nvim-tree/nvim-web-devicons' }, -- use if you prefer nvim-web-devicons
10+
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
11+
lazy = false,
12+
config = function()
13+
require('oil').setup {
14+
columns = { 'icon' },
15+
keymaps = {
16+
['<C-h>'] = false,
17+
['<M-h>'] = 'actions.select_split',
18+
},
19+
view_options = {
20+
show_hidden = true,
21+
},
22+
}
23+
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open Parent directory' })
24+
25+
vim.keymap.set('n', '<space>-', require('oil').toggle_float)
26+
end,
27+
},
28+
}

0 commit comments

Comments
 (0)