mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
maps: allow same key on multiple mode (#360)
* mappings: add new keymap option * mappings: impl keymap option * doc: update release notes * map: fix misinformation * map: remove redundant variable * fixup! mappings: impl keymap option
This commit is contained in:
parent
649f5513f9
commit
b637f921d5
4 changed files with 120 additions and 97 deletions
|
@ -28,10 +28,10 @@ configuration formats.
|
|||
|
||||
### `vim.maps` rewrite {#sec-vim-maps-rewrite}
|
||||
|
||||
Instead of specifying map modes using submodules (eg.: `vim.maps.normal`), a new
|
||||
`mode` option has mode has been introduced. It can be either a string, or a list
|
||||
of strings, where a string represents the short-name of the map mode(s), that
|
||||
the mapping should be set for. See `:help map-modes` for more information.
|
||||
Instead of specifying map modes using submodules (eg.: `vim.maps.normal`), a new `vim.keymaps`
|
||||
submodule with support for a `mode` option has been introduced. It can be either a string, or a
|
||||
list of strings, where a string represents the short-name of the map mode(s), that the mapping
|
||||
should be set for. See `:help map-modes` for more information.
|
||||
|
||||
For example:
|
||||
|
||||
|
@ -42,10 +42,13 @@ vim.maps.normal."<leader>m" = { ... };
|
|||
has to be replaced by
|
||||
|
||||
```nix
|
||||
vim.maps."<leader>m" = {
|
||||
mode = "n";
|
||||
vim.keymaps = [
|
||||
{
|
||||
key = "<leader>m";
|
||||
mode = "n";
|
||||
}
|
||||
...
|
||||
};
|
||||
];
|
||||
```
|
||||
|
||||
### `vim.lsp.nvimCodeActionMenu` removed in favor of `vim.ui.fastaction` {#sec-nvim-code-action-menu-deprecation}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue