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

Migrate to Neovim v0.7

Open bmrips opened this issue 3 years ago • 0 comments

Use Vim's table functions and vim.keymap.set instead of nvim_set_keymap; the latter was introduced with Neovim v0.7. IMO, vim.keymap.set is more flexible as it allows lua functions as RHS and disables remap by default, so that the refactored code is less complex.

One may extend this change to adapt the API of vim.keymap.set:

  1. Specify the mode as a single letter (or empty string) or as a list of single-letter strings. This frees us from handling mode="_" specially.
  2. Move the buffer option to the options table.

These changes would -- of course -- not be backwards compatible, but would be consistent with vim.keymap.set and reduce code complexity.

What do you think?

bmrips avatar Oct 19 '22 09:10 bmrips