return { "nvim-telescope/telescope.nvim", branch = "0.1.x", dependencies = { "nvim-lua/plenary.nvim", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "debugloop/telescope-undo.nvim", "nvim-telescope/telescope-ui-select.nvim", "zschreur/telescope-jj.nvim", }, config = function() require("telescope").setup({ defaults = { mappings = { i = { [""] = false, [""] = false, }, }, }, }) -- Enable telescope fzf native, if installed pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "jj") pcall(require("telescope").load_extension, "scaladex") pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "undo") -- See `:help telescope.builtin` vim.keymap.set("n", "?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) vim.keymap.set("n", "", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" }) vim.keymap.set("n", "/", function() -- You can pass additional configuration to telescope to change theme, layout, etc. require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ winblend = 10, previewer = false, })) end, { desc = "[/] Fuzzily search in current buffer]" }) vim.keymap.set("n", "sf", require("telescope.builtin").find_files, { desc = "[S]earch [F]iles" }) vim.keymap.set("n", "sh", require("telescope.builtin").help_tags, { desc = "[S]earch [H]elp" }) vim.keymap.set("n", "sw", require("telescope.builtin").grep_string, { desc = "[S]earch current [W]ord" }) vim.keymap.set("n", "sg", require("telescope.builtin").live_grep, { desc = "[S]earch by [G]rep" }) vim.keymap.set("n", "sd", require("telescope.builtin").diagnostics, { desc = "[S]earch [D]iagnostics" }) vim.keymap.set("n", "su", "Telescope undo", { desc = "[S]earch [U]ndo" }) end, }