local trouble = require('trouble.providers.telescope') local telescope = require('telescope') telescope.setup { defaults = { mappings = { i = { [''] = trouble.open_with_trouble, [''] = 'which_key', }, n = { [''] = trouble.open_with_trouble, [''] = 'which_key', }, }, }, extensions = { project = { theme = 'dropdown', } } } require('telescope').load_extension('fzf') require('telescope').load_extension('gh') require('telescope').load_extension('env') require('telescope').load_extension('emoji') require('telescope').load_extension('ui-select') require('telescope').load_extension('project') require('telescope').load_extension('session-lens') vim.keymap.set( 'n', '', [[lua require('telescope.builtin').git_files()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'f.', [[lua require('telescope.builtin').git_files({ no_ignore = true })]], { noremap = true, silent = true } ) vim.keymap.set( 'n', '_', [[lua require('telescope.builtin').live_grep()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', '_', [[lua require('telescope.builtin').live_grep({ search_dirs = { vim.fn.expand('%:p:h') } })]], { noremap = true, silent = true } ) vim.keymap.set( 'n', '8', [[lua require('telescope.builtin').grep_string()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', '3', [[lua require('telescope.builtin').grep_string()]], { noremap = true, silent = true } ) vim.keymap.set( "n", "fd", [[lua require('telescope.builtin').find_files({cwd=require('telescope.utils').buffer_dir()})]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fb', [[lua require('telescope.builtin').buffers()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fh', [[lua require('telescope.builtin').help_tags()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'ft', [[lua require('telescope.builtin').treesitter()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fr', [[lua require('telescope.builtin').resume()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fs', [[lua require('telescope.builtin').spell_suggest()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fgc', [[lua require('telescope.builtin').git_commits()]], { noremap = true, silent = true } ) vim.keymap.set( "n", 'fga', [[lua require('telescope.builtin').git_bcommits()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fgb', [[lua require('telescope.builtin').git_branches()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fe', [[Telescope emoji]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'f"', [[lua require('telescope.builtin').registers()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fm', [[lua require('telescope.builtin').keymaps()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'ff', [[lua require('telescope.builtin').builtin()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', 'fl', [[lua require('telescope.builtin').reloader()]], { noremap = true, silent = true } ) vim.keymap.set( 'n', '', [[lua require('telescope').extensions.project.project({ display_type = 'full' })]], { noremap = true, silent = true } ) vim.keymap.set( 'n', '`', [[lua require('session-lens').search_session()]], { noremap = true, silent = true } )