Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435vim.pack.add { "https://github.com/stevearc/oil.nvim", "https://github.com/nvim-mini/mini.icons" }
require("mini.icons").setup {}
local oil = require("oil")oil.setup { constrain_cursor = "name", -- Keep oil buffers open in the background for 10s. cleanup_delay_ms = 10000, view_options = { show_hidden = true, },
keymaps = { -- Allow escaping with <ESC> if the window is floating. ["<ESC>"] = function() local win = vim.api.nvim_get_current_win() local win_cfg = vim.api.nvim_win_get_config(win) if win_cfg.relative ~= "" then oil.close() end end, ["<C-h>"] = false, ["<C-l>"] = false, ["<C-s>"] = false, ["<C-t>"] = false, },}
vim.keymap.set("n", "<leader>f", oil.toggle_float, { desc = "Files" })vim.keymap.set( "n", "<leader>e", function() oil.toggle_float(vim.fn.getcwd()) end, { desc = "Files (cwd)" })