aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/oil.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nvim/lua/plugins/oil.lua95
1 files changed, 55 insertions, 40 deletions
diff --git a/nvim/lua/plugins/oil.lua b/nvim/lua/plugins/oil.lua
index c19baad..0d90db2 100644
--- a/nvim/lua/plugins/oil.lua
+++ b/nvim/lua/plugins/oil.lua
@@ -1,48 +1,63 @@
local init = function()
- local keymap = vim.keymap
- keymap.set("n", "<Space>b", ":Oil --float .<Enter>",
- { noremap = true, silent = true, desc = "File browser (Oil)" }) -- Oil
+ 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()
- local detail = false
- require("oil").setup({
- default_file_explorer = true,
- delete_to_trash = true,
- skip_confirm_for_simple_edits = true,
- keymaps = {
- ["b?"] = "actions.show_help",
- ["<CR>"] = "actions.select",
- ["bp"] = "actions.preview",
- ["q"] = "actions.close",
- ["br"] = "actions.refresh",
- ["-"] = "actions.parent",
- ["_"] = "actions.open_cwd",
- ["~"] = "actions.cd",
- ["bs"] = "actions.change_sort",
- ["b."] = "actions.toggle_hidden",
- ["bt"] = "actions.toggle_trash",
- ["bd"] = {
- desc = "Toggle file detail view",
- callback = function()
- detail = not detail
- if detail then
- require("oil").set_columns({ "icon", "permissions", "size", "mtime" })
- else
- require("oil").set_columns({ "icon" })
- end
- end,
- },
- },
- use_default_keymaps = false,
- })
+ local detail = false
+ require("oil").setup({
+ float = {
+ border = "rounded",
+ },
+ confirmation = {
+ border = "rounded",
+ },
+ progress = {
+ border = "rounded",
+ },
+ ssh = {
+ border = "rounded",
+ },
+ keymaps_help = {
+ border = "rounded",
+ },
+ default_file_explorer = true,
+ delete_to_trash = true,
+ skip_confirm_for_simple_edits = true,
+ keymaps = {
+ ["b?"] = "actions.show_help",
+ ["<CR>"] = "actions.select",
+ ["bp"] = "actions.preview",
+ ["q"] = "actions.close",
+ ["br"] = "actions.refresh",
+ ["-"] = "actions.parent",
+ ["_"] = "actions.open_cwd",
+ ["~"] = "actions.cd",
+ ["bs"] = "actions.change_sort",
+ ["b."] = "actions.toggle_hidden",
+ ["bt"] = "actions.toggle_trash",
+ ["bd"] = {
+ desc = "Toggle file detail view",
+ callback = function()
+ detail = not detail
+ if detail then
+ require("oil").set_columns({ "icon", "permissions", "size", "mtime" })
+ else
+ require("oil").set_columns({ "icon" })
+ end
+ end,
+ },
+ },
+ use_default_keymaps = false,
+ })
end
return {
- "stevearc/oil.nvim",
- dependencies = { "nvim-tree/nvim-web-devicons" },
- lazy = true,
- cmd = "Oil",
- init = init,
- config = config
+ "stevearc/oil.nvim",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ lazy = true,
+ cmd = "Oil",
+ init = init,
+ config = config
}