aboutsummaryrefslogtreecommitdiffstats
path: root/lua/simenandre/plugins/oil.lua
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2024-12-27 15:14:23 +0100
committerSimen A. W. Olsen <hello@simenandre.no>2024-12-27 15:14:23 +0100
commit9155cf33ed7533122666e193dad3f76e8a2b890f (patch)
tree9fbe7d73810d5a0dacd8c9ddb4380f0620c2f600 /lua/simenandre/plugins/oil.lua
parentd8b6277d0915bc5a352f2ec1260866c74cfe2e55 (diff)
downloadconfig.nvim-9155cf33ed7533122666e193dad3f76e8a2b890f.tar.gz
config.nvim-9155cf33ed7533122666e193dad3f76e8a2b890f.zip
add my nvim config
Diffstat (limited to 'lua/simenandre/plugins/oil.lua')
-rw-r--r--lua/simenandre/plugins/oil.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/lua/simenandre/plugins/oil.lua b/lua/simenandre/plugins/oil.lua
new file mode 100644
index 0000000..37e8f94
--- /dev/null
+++ b/lua/simenandre/plugins/oil.lua
@@ -0,0 +1,28 @@
+return {
+ "stevearc/oil.nvim",
+ opts = {},
+ -- Optional dependencies
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ config = function()
+ require("oil").setup({
+ columns = { "icon" },
+ keymaps = {
+ ["<C-h>"] = false,
+ ["<M-h>"] = "actions.select_split",
+ },
+ watch_for_changes = true,
+ view_options = {
+ show_hidden = true,
+ },
+ })
+
+ -- Open parent directory in current window
+ vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
+ vim.keymap.set(
+ "n",
+ "<leader>dd",
+ "<CMD>Oil /Users/cobraz/ghq/github.com/simenandre/notes/<CR>",
+ { desc = "Open parent directory" }
+ )
+ end,
+}