return { "telescope.nvim", after = function() require("telescope").setup({ extensions = { ["ui-select"] = { require("telescope.themes").get_dropdown({}), }, }, }) require("telescope").load_extension("ui-select") local builtin = require("telescope.builtin") vim.keymap.set("n", " ", function() local is_git = vim.fn.finddir(".git", vim.fn.getcwd() .. ";") if is_git then builtin.git_files() else builtin.find_files() end end, { desc = "Grep through all files tracked by git, or fall back to just cwd" }) vim.keymap.set("n", "ff", builtin.find_files, { desc = "Grep through all files in cwd" }) vim.keymap.set("n", "ca", vim.lsp.buf.code_action) vim.keymap.set("n", "/", builtin.live_grep) vim.keymap.set("n", "k", builtin.buffers) vim.keymap.set("n", "gd", builtin.lsp_definitions, { desc = "Go to LSP definition" }) vim.keymap.set("n", "gi", builtin.lsp_implementations, { desc = "Go to implementations" }) vim.keymap.set("n", "j", builtin.lsp_document_symbols, { desc = "Search through document symbols" }) vim.keymap.set( "n", "fs", builtin.lsp_workspace_symbols, { desc = "Search through entire workspace symbols" } ) vim.keymap.set("n", "fd", builtin.diagnostics, { desc = "Search through LSP diagnostics" }) end, priority = 60, }