From c39be0a592e37f0fd71569c043d9ae991fdfbc74 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Fri, 23 Feb 2024 23:46:47 +0100 Subject: [PATCH] vim: clear `telescope` prompt with --- config/nvim/lua/fschauen/plugins/telescope.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/nvim/lua/fschauen/plugins/telescope.lua b/config/nvim/lua/fschauen/plugins/telescope.lua index 8838b1b..d185743 100644 --- a/config/nvim/lua/fschauen/plugins/telescope.lua +++ b/config/nvim/lua/fschauen/plugins/telescope.lua @@ -112,9 +112,13 @@ return { opts = function(_, opts) local actions = require("telescope.actions") local layout = require("telescope.actions.layout") + local state = require("telescope.actions.state") local trouble = vim.F.npcall(require, "trouble.providers.telescope") or {} local mappings = { + [""] = function(prompt_bufnr) + state.get_current_picker(prompt_bufnr):reset_prompt() + end, [""] = actions.cycle_history_next, [""] = actions.cycle_history_prev, [""] = actions.preview_scrolling_down,