---@type LazySpec[] local spec = { { 'nvim-telescope/telescope.nvim', cmd = 'Telescope', init = function() local function map(mode, lhs, rhs, opts) opts = opts or {} opts.silent = true vim.keymap.set(mode, lhs, rhs, opts) end map('n', 'ff', 'Telescope find_files', { desc = 'Telescope find_files' }) map('n', 'fb', 'Telescope buffers', { desc = 'Telescope buffers' }) map('n', 'fr', 'Telescope resume', { desc = 'Telescope resume' }) map('n', 'fg', function() require('telescope.builtin').git_files { git_command = { 'git', 'ls-files', '--exclude-standard', '-co' } } end, { desc = 'Telescope git_files' }) map('n', 'fig', function() require('telescope.builtin').git_files { git_command = { 'git', 'ls-files', '--exclude-standard', '-coi' } } end, { desc = 'Telescope git_files ignore only' }) map('n', 'f*', 'Telescope grep_string', { desc = 'Telescope grep_string' }) map('n', 'fk', 'Telescope keymaps', { desc = 'Telescope keymaps' }) map('n', 'fh', 'Telescope help_tags', { desc = 'Telescope help_tags' }) map('n', 'fcs', 'Telescope colorscheme', { desc = 'Telescope colorscheme' }) map('n', 'fFT', 'Telescope filetypes', { desc = 'Telescope filetypes' }) map('n', 'f:', 'Telescope command_history', { desc = 'Telescope command_history' }) map('n', '/', 'Telescope current_buffer_fuzzy_find', { desc = 'Telescope current_buffer_ff' }) map('n', 'f/', 'Telescope live_grep', { desc = 'Telescope live_grep' }) map('n', '', 'Telescope builtin', { desc = 'Telescope builtin' }) map('n', '', 'Telescope builtin', { desc = 'Telescope builtin' }) map('n', 'ft', 'Telescope file_browser', { desc = 'Telescope file_browser' }) end, config = function() require('telescope').setup { defaults = { layout_config = { horizontal = { prompt_position = 'top', }, }, sorting_strategy = 'ascending', mappings = { i = { ['?'] = 'which_key', [''] = false, -- [''] = 'move_selection_next', -- [''] = 'move_selection_previous', }, n = { t = 'select_tab', }, }, }, pickers = {}, extensions = { file_browser = { theme = 'ivy', hijack_netrw = false, mappings = { ['i'] = { -- your custom insert mode mappings }, ['n'] = { -- your custom normal mode mappings }, }, }, }, } require('telescope').load_extension 'file_browser' end, }, { 'nvim-telescope/telescope-file-browser.nvim' }, } return spec