Files
dotfiles/nvim/lua/plugins/telescope.lua
d0zingcat 76d0e3e44a chore
Signed-off-by: d0zingcat <leewtang@gmail.com>
2025-01-20 16:05:16 +08:00

48 lines
1.2 KiB
Lua

return {
'nvim-telescope/telescope.nvim',
event = 'VeryLazy',
dependencies = {
'nvim-lua/plenary.nvim',
},
opts = {
defaults = {
layout_config = {
horizontal = {
width = 0.75,
height = 0.5,
},
},
mappings = {
i = {
['<esc>'] = 'close',
['<C-k>'] = 'move_selection_previous',
['<C-j>'] = 'move_selection_next',
['<C-l>'] = { '<Right>', type = 'command' },
['<C-h>'] = { '<Left>', type = 'command' },
['<C-f>'] = 'preview_scrolling_down',
['<C-b>'] = 'preview_scrolling_up',
},
},
},
},
keys = {
{
'<leader>ff',
'<cmd>Telescope find_files<cr>',
},
{
'<leader>fg',
'<cmd>Telescope live_grep<cr>',
},
{
'<leader>b',
'<cmd>Telescope buffers<cr>',
},
{
';',
'<cmd>Telescope commands<cr>',
}
},
file_ignore_patterns = { '^vendor/', '^.git/' },
}