From 70fcf2a33c55e76854a9b3d2e3338a6526fd56f5 Mon Sep 17 00:00:00 2001 From: pseudometa <73286100+chrisgrieser@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:58:38 +0200 Subject: [PATCH] fix: apply nowait to plugin keymaps (#120) * fix: plugin keymaps delayed * fix: stylua --- lua/dressing/map_util.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/dressing/map_util.lua b/lua/dressing/map_util.lua index 10c35d2..f91d94e 100644 --- a/lua/dressing/map_util.lua +++ b/lua/dressing/map_util.lua @@ -2,7 +2,12 @@ local M = {} M.create_plug_maps = function(bufnr, plug_bindings) for _, binding in ipairs(plug_bindings) do - vim.keymap.set("", binding.plug, binding.rhs, { buffer = bufnr, desc = binding.desc }) + vim.keymap.set( + "", + binding.plug, + binding.rhs, + { buffer = bufnr, desc = binding.desc, nowait = true } + ) end end @@ -17,7 +22,7 @@ M.create_maps_to_plug = function(bufnr, mode, bindings, prefix) end for lhs, rhs in pairs(bindings) do if rhs then - local opts = { buffer = bufnr, remap = true } + local opts = { buffer = bufnr, remap = true, nowait = true } if type(rhs) == "table" then for k, v in pairs(rhs) do if type(k) == "string" then