local map = require("core.utils").smap return { { "mbbill/undotree", cmd = "UndotreeToggle", keys = { { "u", vim.cmd.UndotreeToggle } }, init = function() vim.g.undotree_DiffAutoOpen = 0 end, }, { "ThePrimeagen/harpoon", branch = "harpoon2", -- selene: allow(multiple_statements) -- stylua: ignore start keys = { { "a", function() require"harpoon":list():append() end }, { "", function() require"harpoon".ui:toggle_quick_menu(require"harpoon":list()) end }, { "", function() require"harpoon":list():select(1) end }, { "", function() require"harpoon":list():select(2) end }, { "", function() require"harpoon":list():select(3) end }, { "", function() require"harpoon":list():select(4) end }, }, -- style: ignore end config = function() require"harpoon":setup { settings = { save_on_toggle = true, sync_on_close = true, } } end, }, { "stevearc/oil.nvim", event = "VeryLazy", keys = { { "e", map("oil", "open") } }, opts = { columns = { "icon" }, delete_to_trash = true, skip_confirm_for_simple_edits = true, lsp_rename_autosave = true, use_default_keymaps = false, keymaps = { ["?"] = "actions.show_help", ["."] = "actions.toggle_hidden", [""] = "actions.select", [""] = "actions.select", [""] = "actions.select_vsplit", [""] = "actions.select_split", [""] = "actions.preview", [""] = "actions.refresh", [""] = "actions.close", [""] = "actions.close", ["-"] = "actions.parent", ["_"] = "actions.open_cwd", [","] = "actions.parent", ["\\"] = "actions.cd", ["C-\\"] = "actions.tcd", ["`"] = "actions.cd", ["~"] = "actions.tcd", }, view_options = { show_hidden = false, is_always_hidden = function(name, _) if ({ [".."] = {}, -- annoying as hell [".git"] = {}, [".docker"] = {}, ["tmp"] = {}, ["build"] = {}, ["dist"] = {}, ["node_modules"] = {}, ["__pycache__"] = {}, ["target"] = {}, })[name] then return true end return false end, is_hidden_file = function(name, _) if ({ ["vendor"] = {}, [".vscode"] = {}, [".bin"] = {}, })[name] then return true end return vim.startswith(name, ".") end, }, }, }, }