return { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim", "nat-418/telescope-color-names.nvim", "ghassan0/telescope-glyph.nvim", "nvim-telescope/telescope-ui-select.nvim", { "nvim-telescope/telescope-fzf-native.nvim", build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release", }, "folke/noice.nvim", }, cmd = "Telescope", keys = { { "//", "Telescope current_buffer_fuzzy_find previewer=false", desc = "Find in current buffer" }, { "??", "Telescope lsp_document_symbols theme=dropdown layout_config={width=0.5}", desc = "Document symbols", }, { "bb", "Telescope buffers", desc = "Buffers" }, { "fc", 'Telescope color_names theme=dropdown layout_config={width=0.45,height=25,prompt_position="bottom"} layout_strategy=vertical', desc = "Color names", }, { "ff", "Telescope find_files find_command=rg,--ignore,--follow,--hidden,--files prompt_prefix=🔍", desc = "Find files", }, { "fg", "Telescope live_grep", desc = "Live grep" }, { "fG", 'Telescope glyph theme=dropdown layout_config={width=0.45,height=35,prompt_position="bottom"} layout_strategy=vertical', desc = "Glyphs", }, { "fr", "Telescope oldfiles theme=dropdown layout_config={width=0.5}", desc = "Recent files" }, { "gc", "Telescope git_commits", desc = "Git commits" }, { "gf", "Telescope git_files", desc = "Git files" }, { "hc", "Telescope commands", desc = "Commands" }, { "hk", "Telescope keymaps", desc = "Keymaps" }, { "hm", "Telescope man_pages theme=dropdown layout_config={width=0.75}", desc = "Man pages" }, { "hs", "Telescope spell_suggest", desc = "Spelling suggestions" }, { "ht", "Telescope help_tags", desc = "Help tags" }, { "hv", "Telescope vim_options", desc = "Neovim options" }, { "s/", "Telescope search_history", desc = "Search history" }, { "sF", "Telescope fidget", desc = "Fidget history" }, { "sf", "Telescope find_files find_command=rg,--ignore,--follow,--hidden,--files prompt_prefix=🔍", desc = "Search files", }, { "sg", "Telescope live_grep", desc = "Live grep" }, { "sh", "Telescope command_history", desc = "Command history" }, { "sm", "Telescope man_pages", desc = "Man pages" }, { "Tc", "Telescope colorscheme", desc = "Colorschemes" }, { "TC", 'Telescope color_names theme=dropdown layout_config={width=0.45,height=25,prompt_position="bottom"} layout_strategy=vertical', desc = "Color names", }, { "Tg", 'Telescope glyph theme=dropdown layout_config={width=0.45,height=35,prompt_position="bottom"} layout_strategy=vertical', desc = "Glyphs", }, { "TN", "Telescope noice theme=dropdown layout_config={width=0.75}", desc = "Noice history" }, { "Tr", "Telescope reloader", desc = "Reload Lua module" }, }, opts = { defaults = { -- Default configuration for telescope goes here: -- config_key = value, layout_strategy = "flex", width = 0.9, wrap_results = true, preview = { border = true, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰", }, title = true, dynamic_preview_title = true, treesitter = true, }, -- mappings = { -- i = { -- -- map actions.which_key to (default: ) -- -- actions.which_key shows the mappings for your picker, -- -- e.g. git_{create, delete, ...}_branch for the git_branches picker -- [""] = "which_key", -- }, -- }, file_ignore_patterns = { "^node_modules/", "^env/", "^__pycache__/" }, }, pickers = { -- Default configuration for builtin pickers goes here: -- picker_name = { -- picker_config_key = value, -- ... -- } -- Now the picker_config_key will be applied every time you call this -- builtin picker find_files = { -- theme = "dropdown" }, }, extensions = { fzf = { fuzzy = true, -- false will only do exact matching override_generic_sorter = true, -- override the generic sorter override_file_sorter = true, -- override the file sorter case_mode = "smart_case", -- or "ignore_case" or "respect_case" -- the default case_mode is "smart_case" }, glyph = { action = function(glyph) -- argument glyph is a table. -- {name="", value="", category="", description=""} -- vim.fn.setreg("*", glyph.value) -- print([[Press p or "*p to paste this glyph]] .. glyph.value) -- insert glyph when picked vim.api.nvim_put({ glyph.value }, "c", false, true) end, }, cmdline = { -- Adjust telescope picker size and layout picker = { layout_config = { width = 120, height = 25, }, }, -- Adjust your mappings mappings = { complete = "", run_selection = "", run_input = "", }, -- Triggers any shell command using overseer.nvim (`:!`) overseer = { enabled = true, }, }, -- ["ui-select"] = { -- require("telescope.themes").get_dropdown({ -- winblend = 10, -- width = 0.5, -- prompt = " ", -- results_height = 15, -- previewer = true, -- }), -- }, }, }, config = function(_, opts) local telescope = require("telescope") local actions = require("telescope.actions") local config = require("telescope.config") local vimgrep_arguments = vim.deepcopy(config.values.vimgrep_arguments) vim.list_extend(vimgrep_arguments, { "--hidden", "--glob", "!**/.git/*" }) opts.defaults.vimgrep_arguments = vimgrep_arguments opts.defaults.mappings = vim.tbl_deep_extend("force", opts.defaults.mappings or {}, { i = { [""] = actions.results_scrolling_left, [""] = actions.results_scrolling_right, }, }) telescope.setup(opts) for _, extension in ipairs({ "color_names", "fzf", "glyph", "noice", "ui-select" }) do pcall(telescope.load_extension, extension) end end, }