1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-- Replace netrw with Oil to work with the file hierarchy
-- as a regular vim buffer.
vim.pack.add {
{
name = 'mini.icons',
src = 'https://github.com/nvim-mini/mini.icons',
},
{
name = 'oil',
src = 'https://github.com/stevearc/oil.nvim',
},
}
require('mini.icons').setup {}
require('oil').setup {
keymaps = {
-- Clashes with tmux navigator
['<C-l>'] = false,
['<C-h>'] = false,
-- Remap refresh to a new key, since we just disabled it.
['<C-r>'] = 'actions.refresh',
},
}
vim.keymap.set('n', '\\', '<CMD>Oil --float<CR>', { desc = 'Open parent directory in floating window' })
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
|