summaryrefslogtreecommitdiff
path: root/lua/plugins/oil.lua
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-09-08 01:28:22 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-09-08 01:28:22 -0400
commitfea8c12adb35076cc6bae11cc345f0270ec45110 (patch)
treeed2ec226fe93513ad41616346fc7199fa6450076 /lua/plugins/oil.lua
parent167b84d94a0ea1986ae391ccfba162b382b0d33b (diff)
parent9973585a15e2769ebc8dfe81e7c35c5965064171 (diff)
Merge branch 'master' of github.com:ChausseBenjamin/neovim-confHEADmaster
Diffstat (limited to 'lua/plugins/oil.lua')
-rw-r--r--lua/plugins/oil.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua
new file mode 100644
index 0000000..0a912b7
--- /dev/null
+++ b/lua/plugins/oil.lua
@@ -0,0 +1,34 @@
+return {
+ "stevearc/oil.nvim",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ config = function()
+ require("oil").setup({
+ columns = { "icon" },
+ keymaps = {
+ ["<C-h>"] = false,
+ ["<M-h>"] = "actions.select_split",
+ },
+ view_options = {
+ show_hidden = true,
+ },
+ })
+ end,
+ keys = {
+
+ { -- Floating Oil window
+ "<leader>-",
+ function()
+ require("oil").toggle_float()
+ end,
+ mode = "n",
+ desc = "Toggle floating Oil window",
+ },
+
+ { -- Open parent directory
+ "-",
+ "<cmd>Oil<CR>",
+ mode = "n",
+ desc = "Open parent directory",
+ },
+ },
+}