nvim: add plugin 'stevearc/oil.nvim'

This commit is contained in:
Fernando Schauenburg 2025-06-30 15:48:16 +02:00
parent 1b9dfaaae4
commit b70bbbc582
2 changed files with 59 additions and 0 deletions

View file

@ -37,6 +37,7 @@
"nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
"nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" },
"oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" },
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "ec1a2431f8872f650a85ed71c24f0715df2e49c2" },
"open-browser.vim": { "branch": "master", "commit": "7d4c1d8198e889d513a030b5a83faa07606bac27" },
"plantuml-previewer.vim": { "branch": "master", "commit": "368a1f331c1ff29f6a3ee76facfca39a7f374b13" },

View file

@ -0,0 +1,58 @@
return {
"stevearc/oil.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
cmd = "Oil",
keys = {
{ "-", "<cmd>Oil<cr>", desc = "Open Oil" },
},
config = function()
require("oil").setup {
columns = {
"icon",
"permissions",
"size",
"mtime",
},
keymaps = {
["<c-s>"] = {
"actions.select",
opts = {
horizontal = true,
split = "belowright",
},
},
["<c-b>"] = { -- Not using <c-v> so that I can use Visual Block mode.
"actions.select",
opts = {
vertical = true,
split = "belowright",
},
},
-- I use default <c-l> for navigation, so refresh with <c-r>.
["<c-r>"] = "actions.refresh",
["<c-l>"] = false,
["<leader>:"] = {
"actions.open_cmdline",
opts = {
shorten_path = true,
},
desc = "Open command line with current entry as an argument",
},
["q"] = "actions.close",
},
view_options = {
show_hidden = true,
},
}
end,
}