diff --git a/lua/config/remaps.lua b/lua/config/remaps.lua index 6a4fef5..b38fae1 100644 --- a/lua/config/remaps.lua +++ b/lua/config/remaps.lua @@ -5,7 +5,7 @@ vim.g.maplocalleader = "\\" -- netrw -vim.keymap.set("n", "pv", vim.cmd.Ex) +vim.keymap.set("n", "pv", vim.cmd.Oil) -- move vim.keymap.set("v", "J", ":m '>+1gv=gv") diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua new file mode 100644 index 0000000..65049f0 --- /dev/null +++ b/lua/plugins/oil.lua @@ -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 + }