diff options
| author | eric.marin <maarin.eric@gmail.com> | 2024-09-11 14:49:39 +0200 |
|---|---|---|
| committer | eric.marin <maarin.eric@gmail.com> | 2024-09-11 14:59:47 +0200 |
| commit | 9f20c1f313e20102dd83adeaf091284be1fd82d0 (patch) | |
| tree | d3db386875af532f4fc55c275312c7c787e88f55 /nvim/lua/plugins/oil.lua | |
| download | dotfiles-9f20c1f313e20102dd83adeaf091284be1fd82d0.tar.gz dotfiles-9f20c1f313e20102dd83adeaf091284be1fd82d0.zip | |
config
Diffstat (limited to '')
| -rw-r--r-- | nvim/lua/plugins/oil.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nvim/lua/plugins/oil.lua b/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..be3f35e --- /dev/null +++ b/nvim/lua/plugins/oil.lua @@ -0,0 +1,38 @@ +local init = function() + local keymap = vim.keymap + keymap.set("n", "<Space>b", ":Oil --float .<Enter>", + { noremap = true, silent = true, desc = "File browser (Oil)" }) -- Oil +end + + + +local config = function() + require("oil").setup({ + default_file_explorer = true, + delete_to_trash = true, + skip_confirm_for_simple_edits = true, + keymaps = { + ["o?"] = "actions.show_help", + ["<CR>"] = "actions.select", + ["op"] = "actions.preview", + ["q"] = "actions.close", + ["or"] = "actions.refresh", + ["-"] = "actions.parent", + ["_"] = "actions.open_cwd", + ["~"] = "actions.cd", + ["os"] = "actions.change_sort", + ["o."] = "actions.toggle_hidden", + ["ot"] = "actions.toggle_trash", + }, + use_default_keymaps = false, + }) +end + +return { + "stevearc/oil.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + lazy = true, + cmd = "Oil", + init = init, + config = config +} |
