marks.nvim
marks.nvim copied to clipboard
keymap: use nvim api for setting keymaps
This allows setting a reasonable description for each mapping that will render nicely in plugins like which-key.
This is using the older vim.api.nvim_set_keymap
function in order to retain compatibility with Neovim 0.5, as noted in the readme. If/when the minimum version were bumped to 0.7, this could be further simplified to:
vim.keymap.set("n", key, M[cmd], { desc = "marks: "..cmd:gsub("_", " ") })