vim: add plugin 'stevearc/oil.nvim'

This commit is contained in:
Fernando Schauenburg 2024-02-10 17:07:18 +01:00
parent ac5a50894b
commit 673f4839c2
2 changed files with 45 additions and 0 deletions

View file

@ -26,6 +26,7 @@
"nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "dd0b2036c3a27cb6e6486f8bd24188c6ca43af0b" },
"nvim-web-devicons": { "branch": "master", "commit": "313d9e7193354c5de7cdb1724f9e2d3f442780b0" },
"oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" },
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "4be2e8689067494ed7e5a4f1221adc31d1a07783" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },

View file

@ -0,0 +1,44 @@
local M = { 'stevearc/oil.nvim' }
M.cmd = 'Oil'
M.dependencies = { 'nvim-tree/nvim-web-devicons' }
M.keys = {
{ '<leader>o', '<cmd>Oil<cr>' },
}
M.config = function()
require('oil').setup {
default_file_explorer = true,
columns = {
'icon',
'permissions',
'size',
'mtime',
},
constrain_cursor = 'name',
keymaps = {
-- Not using <c-v> because Visual Block mode is useful in an Oil buffer.
['<C-l>'] = 'actions.select_vsplit',
['<C-j>'] = 'actions.select_split',
['<C-s>'] = 'actions.select_split',
['<C-h>'] = false, -- Disable default keymap for 'actions.select_split'.
['<C-r>'] = 'actions.refresh',
['q'] = 'actions.close',
},
view_options = {
show_hidden = true,
},
}
end
return M