Skip to content

Commit

Permalink
fix: apply nowait to plugin keymaps (#120)
Browse files Browse the repository at this point in the history
* fix: plugin keymaps delayed

* fix: stylua
  • Loading branch information
chrisgrieser committed Oct 10, 2023
1 parent 34e52d5 commit 70fcf2a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lua/dressing/map_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 70fcf2a

Please sign in to comment.