2024-06-17 15:22:39 +07:00
|
|
|
return {
|
|
|
|
"stevearc/oil.nvim",
|
|
|
|
opts = {
|
|
|
|
keymaps = {
|
|
|
|
["q"] = "actions.close",
|
|
|
|
["<bs>"] = "actions.parent",
|
2024-10-10 09:33:04 +07:00
|
|
|
["h"] = "actions.parent",
|
|
|
|
["l"] = "actions.select",
|
|
|
|
["gv"] = {
|
|
|
|
callback = function()
|
|
|
|
require("oil.actions").select.callback { vertical = true }
|
|
|
|
require("oil.actions").close.callback()
|
|
|
|
end,
|
|
|
|
desc = "Open the entry in a vertical split and close the Oil window",
|
|
|
|
nowait = true,
|
|
|
|
},
|
|
|
|
["gs"] = {
|
|
|
|
callback = function()
|
|
|
|
require("oil.actions").select.callback { horizontal = true }
|
|
|
|
require("oil.actions").close.callback()
|
|
|
|
end,
|
|
|
|
desc = "Open the entry in a horizontal split and close the Oil window",
|
|
|
|
nowait = true,
|
|
|
|
},
|
2024-06-17 15:22:39 +07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
|
|
cmd = { "Oil" },
|
|
|
|
keys = {
|
2024-10-10 09:33:04 +07:00
|
|
|
{
|
|
|
|
"-",
|
|
|
|
function()
|
|
|
|
require("oil").open()
|
|
|
|
vim.defer_fn(function()
|
|
|
|
require("oil").open_preview()
|
|
|
|
end, 150)
|
|
|
|
end,
|
|
|
|
},
|
2024-06-17 15:22:39 +07:00
|
|
|
},
|
2024-10-09 13:50:49 +07:00
|
|
|
enabled = true,
|
2024-06-17 15:22:39 +07:00
|
|
|
}
|