return { 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make', cond = function() return vim.fn.executable 'make' == 1 end, } }, opts = { defaults = { mappings = { i = { [''] = false, [''] = false, }, }, }, }, config = function() -- Load fzf if available pcall(require('telescope').load_extension, 'fzf') local ts_builtin = require('telescope.builtin') vim.keymap.set('n', '?', ts_builtin.oldfiles, { desc = '[?] Find recently opened files' }) vim.keymap.set('n', '', ts_builtin.buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', '/', function() -- You can pass additional configuration to telescope to change theme, layout, etc. ts_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', 'gf', ts_builtin.git_files, { desc = '[g]it: search [f]iles' }) vim.keymap.set('n', 'sf', ts_builtin.find_files, { desc = '[s]earch [f]iles' }) vim.keymap.set('n', 'sh', ts_builtin.help_tags, { desc = '[s]earch [h]elp' }) vim.keymap.set('n', 'sw', ts_builtin.grep_string, { desc = '[s]earch current [w]ord' }) vim.keymap.set('n', 'sg', ts_builtin.live_grep, { desc = '[s]earch by [g]rep' }) vim.keymap.set('n', 'sd', ts_builtin.diagnostics, { desc = '[s]earch [d]iagnostics' }) vim.keymap.set('n', 'sr', ts_builtin.lsp_references, { desc = '[s]earch [r]eferences' }) vim.keymap.set('n', 'si', ts_builtin.lsp_implementations, { desc = '[s]earch [i]mplementations' }) end, }