marks.nvim icon indicating copy to clipboard operation
marks.nvim copied to clipboard

keymap: use nvim api for setting keymaps

Open willnorris opened this issue 1 year ago • 2 comments

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("_", " ")  }) 

willnorris avatar Mar 04 '23 06:03 willnorris