summaryrefslogtreecommitdiff
path: root/lua/talha/plugins/telescope.lua
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2026-07-26 11:55:58 +0500
committertalha <talha@talhaamir.xyz>2026-07-26 11:55:58 +0500
commit1c8503345693788660ac0a132b111ebeb08ed87f (patch)
treef78456b136fef6ad77885ee518e3def2dcde1a6f /lua/talha/plugins/telescope.lua
parent70fe2441aa025243e29d47aabe1b6674c4e0ed71 (diff)
Updated config
Diffstat (limited to 'lua/talha/plugins/telescope.lua')
-rw-r--r--lua/talha/plugins/telescope.lua38
1 files changed, 36 insertions, 2 deletions
diff --git a/lua/talha/plugins/telescope.lua b/lua/talha/plugins/telescope.lua
index 8b3a54b..65bfae9 100644
--- a/lua/talha/plugins/telescope.lua
+++ b/lua/talha/plugins/telescope.lua
@@ -1,6 +1,6 @@
return {
{
- "nvim-telescope/telescope.nvim", version = "0.1.2",
+ "nvim-telescope/telescope.nvim", version = "*",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local builtin = require('telescope.builtin')
@@ -13,6 +13,40 @@ return {
vim.keymap.set('n', '<leader>pb', builtin.buffers)
vim.keymap.set('n', '<leader>ph', builtin.help_tags)
vim.keymap.set('n', '<leader>mp', builtin.man_pages)
- end
+
+
+ local actions = require('telescope.actions')
+ require("telescope").setup({
+ defaults = {
+ mappings = {
+ i = { -- Insert mode mappings
+ ["<C-u>"] = actions.preview_scrolling_up,
+ ["<C-d>"] = actions.preview_scrolling_down,
+ ["<C-h>"] = actions.preview_scrolling_left,
+ ["<C-l>"] = actions.preview_scrolling_right,
+ ["<A-j>"] = actions.move_selection_next,
+ ["<A-k>"] = actions.move_selection_previous,
+ ["<A-u>"] = actions.results_scrolling_up,
+ ["<A-d>"] = actions.results_scrolling_down,
+ ["<A-h>"] = actions.results_scrolling_left,
+ ["<A-l>"] = actions.results_scrolling_right,
+ },
+ n = { -- Normal mode mappings
+ ["<C-u>"] = actions.preview_scrolling_up,
+ ["<C-d>"] = actions.preview_scrolling_down,
+ ["<C-h>"] = actions.preview_scrolling_left,
+ ["<C-l>"] = actions.preview_scrolling_right,
+ ["<A-k>"] = actions.move_selection_previous,
+ ["<A-j>"] = actions.move_selection_next,
+ ["<A-u>"] = actions.results_scrolling_up,
+ ["<A-d>"] = actions.results_scrolling_down,
+ ["<A-h>"] = actions.results_scrolling_left,
+ ["<A-l>"] = actions.results_scrolling_right,
+ ["<C-[>"] = actions.close,
+ },
+ },
+ },
+ })
+ end
}
}