return { { "nvim-telescope/telescope.nvim", priority = 500, dependencies = { "nvim-lua/plenary.nvim", { "nvim-telescope/telescope-fzf-native.nvim", build = "make", cond = vim.fn.executable("make") == 1 }, "gbprod/yanky.nvim", }, lazy = false, config = function() require('telescope').setup({ defaults = { path_display = { "truncate" }, prompt_prefix = " ", }, extensions = { fzf = { fuzzy = true, -- false will only do exact matching override_generic_sorter = true, override_file_sorter = true, case_mode = "smart_case", }, }, }) -- Enable telescope fzf native, if installed pcall(require("telescope").load_extension, "fzf") local map = require("helpers.keys").map map("n", "fr", require("telescope.builtin").oldfiles, "🔭: recently opened") map("n", "", require("telescope.builtin").buffers, "🔭: open buffers") map("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, "🔭: search in current buffer") map("n", "sf", require("telescope.builtin").find_files, "🔭: find files") map("n", "sh", require("telescope.builtin").help_tags, "🔭: help") map("n", "sw", require("telescope.builtin").grep_string, "🔭: current word") map("n", "sg", require("telescope.builtin").live_grep, "🔭: live grep") map("n", "sd", require("telescope.builtin").diagnostics, "🔭: diagnostics") map("n", "st", function() require("telescope.builtin").spell_suggest(require("telescope.themes").get_cursor({ prompt_title = "", layout_config = { height = 0.25, width = 0.25, }, winblend = 10, previewer = false, })) end , "🔭: spelling suggest") require("telescope").load_extension("yank_history") map("n", "sp", require("telescope").extensions.yank_history.yank_history, "🔭: yank history") end, }, }