From 00083b0deb45a23db396b8c0124e2dc852b2d204 Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Fri, 31 May 2024 11:29:44 -0700 Subject: [PATCH] Neovim: Add action to delete a buffer from Telescope --- nvim/init.lua | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/nvim/init.lua b/nvim/init.lua index ac8d1ae..c4c720f 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -296,11 +296,20 @@ require('lazy').setup({ -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, + defaults = { + mappings = { + n = { + -- Add action to delete a buffer from the Telescope list + [''] = require('telescope.actions').delete_buffer, + }, + i = { + -- [''] = 'to_fuzzy_refine', + + -- Add action to delete a buffer from the Telescope list + [''] = require('telescope.actions').delete_buffer, + }, + }, + }, -- pickers = {} extensions = { ['ui-select'] = {