From 98f8c886d6d07e6de6d70ac14f9fc8690a6d9c3c Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 27 Aug 2025 12:09:21 +0200 Subject: [PATCH] fix(nvim): enable ctrl-w back in smart open --- .gitignore | 1 + nvim/lua/olinpin/plugins/smart-open.lua | 4 ---- nvim/lua/olinpin/plugins/telescope.lua | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6943ce5..dba329c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ glab-cli/**/mr.json **/lazy-lock.json github-copilot/hosts.json omz-custom/plugins +omz-custom/vrm.sh omz testDir diff --git a/nvim/lua/olinpin/plugins/smart-open.lua b/nvim/lua/olinpin/plugins/smart-open.lua index 1416adf..9b9f57d 100644 --- a/nvim/lua/olinpin/plugins/smart-open.lua +++ b/nvim/lua/olinpin/plugins/smart-open.lua @@ -6,9 +6,5 @@ return { end, dependencies = { "kkharji/sqlite.lua", - -- -- Only required if using match_algorithm fzf - -- { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, - -- -- Optional. If installed, native fzy will be used when match_algorithm is fzy - -- { "nvim-telescope/telescope-fzy-native.nvim" }, }, } diff --git a/nvim/lua/olinpin/plugins/telescope.lua b/nvim/lua/olinpin/plugins/telescope.lua index b6e0925..4ae4561 100644 --- a/nvim/lua/olinpin/plugins/telescope.lua +++ b/nvim/lua/olinpin/plugins/telescope.lua @@ -29,6 +29,20 @@ return { local telescope = require("telescope") telescope.setup({ + extensions = { + smart_open = { + mappings = { + i = { + -- works around smart_open overriding ctrl-w keybind for deleting + -- word. should be able to remove this once this issue is resolved: + -- https://github.com/danielfalk/smart-open.nvim/issues/71 + [""] = function() + vim.api.nvim_input("") + end, + }, + }, + }, + }, defaults = { buffer_previewer_maker = new_maker, },