return { 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-fzy-native.nvim', }, opts = { defaults = { file_ignore_patterns = { ".cache/.*", "node_modules/.*", ".git/.*", "Venv/.*", "venv/.*", "wandb/.*", "Resources/.*", "build/.*" }, mappings = { i = { ["jj"] = require("telescope.actions").close, [""] = require("telescope.actions").move_selection_next, [""] = require("telescope.actions").move_selection_previous, }, }, file_sorter = require'telescope.sorters'.get_fzy_sorter, generic_sorter = require'telescope.sorters'.get_fzy_sorter, }, extensions = { undo = { side_by_side = false, layout_strategy = "vertical", use_delta = true, layout_config = { preview_height = 0.5, }, mappings = { i = { [""] = require("telescope-undo.actions").restore, [""] = require("telescope-undo.actions").yank_additions, }, }, } }, fzy_native = { override_generic_sorter = false, override_file_sorter = true, } }, keys = { { "u", require("telescope").extensions.undo.undo}, { "", require("telescope.builtin").oldfiles}, { "", function () require"telescope.builtin".live_grep({ path_display = { 'smart' }, }) end}, { "", function () -- git files local opts = require('telescope.themes').get_ivy({}) opts["show_untracked"] = true opts["layout_config"] = {height=0.2} if not pcall(require"telescope.builtin".git_files, opts) then require"telescope.builtin".find_files(opts) end end}, { "", function () -- project files local opts = require('telescope.themes').get_ivy({}) opts["layout_config"] = {height=0.2} require"telescope.builtin".find_files(opts) end}, { "", function () -- buffer files local opts = require('telescope.themes').get_ivy({}) opts["layout_config"] = {height=0.2} require"telescope.builtin".buffers(opts) end}, { "", function () -- fuzzy search require"telescope.builtin".grep_string({ path_display = { 'smart' }, only_sort_text = true, word_match = "-w", search = '', }) end}, }, config = function (_, opts) local telescope = require("telescope") telescope.setup(opts) telescope.load_extension("undo") telescope.load_extension('fzy_native') end }