nvim/lua/plugins/oil.lua

26 lines
676 B
Lua

return {
"stevearc/oil.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
cmd = "Oil",
init = function()
vim.keymap.set("n", "<leader>o", "<cmd>Oil<cr>")
if vim.fn.argc() == 1 then
local stat = vim.loop.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then require "oil" end
end
end,
config = true,
opts = {
float = {
-- Padding around the floating window
padding = 2,
max_width = 0,
max_height = 0,
border = "rounded",
win_options = {
winblend = 10,
},
},
},
}