fix: apply nowait to plugin keymaps (#120)

* fix: plugin keymaps delayed

* fix: stylua
This commit is contained in:
pseudometa 2023-10-10 17:58:38 +02:00 committed by GitHub
parent 34e52d58a2
commit 70fcf2a33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -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