require("oil").setup({ default_file_explorer = true, columns = { "permissions", "size", -- "mtime", }, buf_options = { buflisted = false, bufhidden = "hide", }, win_options = { wrap = false, signcolumn = "no", cursorcolumn = false, foldcolumn = "0", spell = false, list = false, conceallevel = 3, concealcursor = "nvic", }, delete_to_trash = false, skip_confirm_for_simple_edits = false, prompt_save_on_select_new_entry = true, cleanup_delay_ms = 2000, lsp_file_methods = { enabled = true, timeout_ms = 1000, autosave_changes = false, }, constrain_cursor = "editable", watch_for_changes = false, keymaps = { ["g?"] = { "actions.show_help", mode = "n" }, [""] = "actions.select", [""] = { "actions.select", opts = { vertical = true } }, [""] = { "actions.select", opts = { horizontal = true } }, [""] = { "actions.select", opts = { tab = true } }, [""] = false, [""] = { "actions.close", mode = "n" }, [""] = "actions.refresh", ["-"] = { "actions.parent", mode = "n" }, ["_"] = { "actions.open_cwd", mode = "n" }, ["`"] = { "actions.cd", mode = "n" }, ["g~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" }, ["gs"] = false, ["gx"] = "actions.open_external", ["zh"] = { "actions.toggle_hidden", mode = "n" }, ["gt"] = "actions.open_terminal", ["Y"] = require("mo.oil-util").copy_to_clipboard, ["y"] = function() require("mo.oil-util").copy_to_clipboard({ full_path = false }) end, [":"] = { "actions.open_cmdline", opts = { shorten_path = true, modify = ":h" }, }, [";"] = { "actions.open_cmdline", opts = { shorten_path = true }, }, }, use_default_keymaps = false, view_options = { show_hidden = false, is_hidden_file = function(name, _bufnr) local m = name:match("^%.") return m ~= nil end, is_always_hidden = function(_name, _bufnr) return false end, natural_order = "fast", case_insensitive = false, sort = { { "type", "asc" }, { "name", "asc" }, }, }, } --[[@as oil.SetupOpts]])