Adds oil plugin

This commit is contained in:
2025-12-24 14:59:16 +01:00
parent 20e16a721e
commit a65070d275
2 changed files with 24 additions and 1 deletions

View File

@ -5,7 +5,7 @@ vim.g.maplocalleader = "\\"
-- netrw
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", "<leader>pv", vim.cmd.Oil)
-- move
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")

23
lua/plugins/oil.lua Normal file
View File

@ -0,0 +1,23 @@
return
{
'stevearc/oil.nvim',
---@module 'oil'
---@type oil.SetupOpts
opts = {},
-- Optional dependencies
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
config = function()
require("oil").setup({
default_file_explorer = true,
columns = {
"icon",
},
skip_confirm_for_simple_edits = true,
constrain_cursor = "editable",
})
end
}