chore(mappings): migrate legacy mappings under the hood#1476
chore(mappings): migrate legacy mappings under the hood#1476kyazdani42 wants to merge 2 commits intomasterfrom
Conversation
64b1387 to
11d97de
Compare
11d97de to
9da4462
Compare
alex-courtis
left a comment
There was a problem hiding this comment.
NOTE2: this should not be merged before the help menu is rewritten
We could be lazy: retain the view.mappings.list for help to look up, if we want to merge this before.
NOTE3: this can be used to print the on_attach migration to the user.
Yes. vim.keymap.set is ready to print.
|
|
||
| local opts = merge_options(conf) | ||
| local netrw_disabled = opts.disable_netrw or opts.hijack_netrw | ||
| legacy.move_mappings_to_keymap(opts) |
There was a problem hiding this comment.
I like this approach: moving the mappings after merge means we only have to do this once.
| end | ||
| end | ||
|
|
||
| local OLD_MAPPING_TABLE = { |
There was a problem hiding this comment.
We could be lazy and move this to DEFAULT_KEYMAPS with a legacy_action field.
There was a problem hiding this comment.
Yes, also i've noticed from some PRs on nvim-treesitter that vim.keymap.set takes an optional "desc" argument which we should use so the nvim-tree will work in which-key and allow us to use that in the help menu
|
See #1579 |
NOTE: this should not be merged before we tested it thoroughly.
NOTE2: this should not be merged before the help menu is rewritten
NOTE3: this can be used to print the on_attach migration to the user.