mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 07:25:30 +00:00
docs: add section on keymaps in configuring.md
This commit is contained in:
parent
fdb8297aea
commit
54834e72bf
2 changed files with 40 additions and 0 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
# Configuring nvf {#ch-configuring}
|
# Configuring nvf {#ch-configuring}
|
||||||
|
|
||||||
|
This section gives a general overview of how to configure nvf. If something
|
||||||
|
specific you are looking for isn't covered here, try searching it in the
|
||||||
|
[options reference](#ch-options)
|
||||||
|
|
||||||
```{=include=} chapters
|
```{=include=} chapters
|
||||||
|
configuring/keymaps.md
|
||||||
configuring/custom-package.md
|
configuring/custom-package.md
|
||||||
configuring/custom-plugins.md
|
configuring/custom-plugins.md
|
||||||
configuring/overriding-plugins.md
|
configuring/overriding-plugins.md
|
||||||
|
|
|
||||||
35
docs/manual/configuring/keymaps.md
Normal file
35
docs/manual/configuring/keymaps.md
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Custom keymaps {#ch-keymaps}
|
||||||
|
|
||||||
|
Some plugin modules provide keymap options for convenience. If a keymap is not
|
||||||
|
provided by such options, you can easily add custom keymaps yourself via
|
||||||
|
`vim.keymaps`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{...}: {
|
||||||
|
config.vim.keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>m";
|
||||||
|
mode = "n";
|
||||||
|
silent = true;
|
||||||
|
action = ":make<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>l";
|
||||||
|
mode = ["n" "x"];
|
||||||
|
silent = true;
|
||||||
|
action = "<cmd>cnext<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>k";
|
||||||
|
mode = ["n" "x"];
|
||||||
|
lua = true;
|
||||||
|
action = ''
|
||||||
|
function()
|
||||||
|
require('foo').do_thing()
|
||||||
|
print('did thing')
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue