Files
dotfiles/nvim/lua/plugins/telescope.lua
d0zingcat de0d805904 fix ts key order
Signed-off-by: d0zingcat <leewtang@gmail.com>
2024-07-05 16:35:11 +08:00

47 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>',
}
},
}