From 52655d253709af2f62741d06e4a69362abcb0620 Mon Sep 17 00:00:00 2001 From: Simon Lasbrugnas Date: Sun, 28 Jul 2024 22:41:44 +0200 Subject: [PATCH] chore(telescope): Disable normal mode Also remap ps to p as there aren't any other commands using the p prefix in my config. Might change it later. --- lua/plugins/telescope.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 9025424..fcf007b 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -14,9 +14,21 @@ return { case_mode = "smart_case", -- or "ignore_case" or "respect_case" } }, + config = function() + local actions = require("telescope.actions") + require("telescope").setup { + defaults = { + mappings = { + i = { + [""] = actions.close + }, + }, + } + } + end, keys = { - { "", "Telescope find_files", desc = "Find files" }, - { "ps", "Telescope live_grep", desc = "Live Grep" }, + { "", "Telescope find_files", desc = "Find files" }, + { "p", "Telescope live_grep", desc = "Live Grep" }, -- Search almost everything (except .git folder) { "fa",