From 2b754cccc0b42add6d607319ab05891d3d27cf09 Mon Sep 17 00:00:00 2001 From: Joshua Molloy Date: Mon, 24 Feb 2025 10:37:55 +0000 Subject: [PATCH] feat: added oil --- lua/custom/plugins/oil.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lua/custom/plugins/oil.lua diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 00000000..20281447 --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,28 @@ +return { + { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + dependencies = { { 'echasnovski/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 { + columns = { 'icon' }, + keymaps = { + [''] = false, + [''] = 'actions.select_split', + }, + view_options = { + show_hidden = true, + }, + } + vim.keymap.set('n', '-', 'Oil', { desc = 'Open Parent directory' }) + + vim.keymap.set('n', '-', require('oil').toggle_float) + end, + }, +}