Skip to content

Commit 766e0f2

Browse files
committed
Customize telescope keymaps
1 parent f230905 commit 766e0f2

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

lua/kickstart/plugins/telescope.lua

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,16 @@ return {
5555
-- You can put your default mappings / updates / etc. in here
5656
-- All the info you're looking for is in `:help telescope.setup()`
5757
--
58-
-- defaults = {
59-
-- mappings = {
60-
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
61-
-- },
62-
-- },
58+
defaults = {
59+
mappings = {
60+
i = {
61+
['<C-j>'] = 'move_selection_next',
62+
['<C-k>'] = 'move_selection_previous',
63+
['<C-u>'] = 'preview_scrolling_up',
64+
['<C-d>'] = 'preview_scrolling_down',
65+
},
66+
},
67+
},
6368
-- pickers = {}
6469
extensions = {
6570
['ui-select'] = {
@@ -85,6 +90,10 @@ return {
8590
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
8691
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
8792

93+
-- Custom keymaps
94+
vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = '[S]earch by [G]rep' })
95+
vim.keymap.set('n', '<C-f>', builtin.live_grep, { desc = '[S]earch by [F]iles' })
96+
8897
-- Slightly advanced example of overriding default behavior and theme
8998
vim.keymap.set('n', '<leader>/', function()
9099
-- You can pass additional configuration to Telescope to change the theme, layout, etc.

0 commit comments

Comments
 (0)