summaryrefslogtreecommitdiff
path: root/lua/quicker/keys.lua
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2025-01-19 13:52:31 +0100
committerMike Vink <mike@pionative.com>2025-01-19 13:52:31 +0100
commitc65afb488eb9eab85063d79783d40ae1d7138586 (patch)
tree48ce8318f6fc22eb0b82df83b5c175469b853643 /lua/quicker/keys.lua
Squashed 'mut/neovim/pack/plugins/start/quicker.nvim/' content from commit 049def7
git-subtree-dir: mut/neovim/pack/plugins/start/quicker.nvim git-subtree-split: 049def718213d3cdf49fdf29835aded09b3e54a3
Diffstat (limited to 'lua/quicker/keys.lua')
-rw-r--r--lua/quicker/keys.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/quicker/keys.lua b/lua/quicker/keys.lua
new file mode 100644
index 0000000..17ea331
--- /dev/null
+++ b/lua/quicker/keys.lua
@@ -0,0 +1,20 @@
+local config = require("quicker.config")
+
+local M = {}
+
+---@param bufnr integer
+function M.set_keymaps(bufnr)
+ for _, defn in ipairs(config.keys) do
+ vim.keymap.set(defn.mode or "n", defn[1], defn[2], {
+ buffer = bufnr,
+ desc = defn.desc,
+ expr = defn.expr,
+ nowait = defn.nowait,
+ remap = defn.remap,
+ replace_keycodes = defn.replace_keycodes,
+ silent = defn.silent,
+ })
+ end
+end
+
+return M