nest.nvim
nest.nvim copied to clipboard
Migrate to Neovim v0.7
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:
- 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. - Move the
bufferoption to theoptionstable.
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?