mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-03 10:25:52 +00:00
docs/manual: add custom keybinds section; minor wording tweaks
Co-Authored-by: horriblename <badnam3o.0@gmail.com> Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Idefa75ca9a92f89d008977a88066515d6a6a6964
This commit is contained in:
parent
3182811b8d
commit
8050617656
3 changed files with 41 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ configuring/custom-package.md
|
|||
configuring/custom-plugins.md
|
||||
configuring/overriding-plugins.md
|
||||
configuring/languages.md
|
||||
configuring/keybinds.md
|
||||
configuring/dags.md
|
||||
configuring/dag-entries.md
|
||||
configuring/autocmds.md
|
||||
|
|
|
|||
38
docs/manual/configuring/keybinds.md
Normal file
38
docs/manual/configuring/keybinds.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Custom keymaps {#ch-keymaps}
|
||||
|
||||
Some plugin modules provide keymap options for your convenience. If a keymap is
|
||||
not provided by such module options, you may easily register your own custom
|
||||
keymaps via {option}`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"];
|
||||
|
||||
# While `lua` is `true`, `action` is expected to be
|
||||
# a valid Lua expression.
|
||||
lua = true;
|
||||
action = ''
|
||||
function()
|
||||
require('foo').do_thing()
|
||||
print('did thing')
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
```
|
||||
|
|
@ -14,11 +14,12 @@ vim.pluginOverrides = {
|
|||
rev = "";
|
||||
hash = "";
|
||||
};
|
||||
|
||||
# It's also possible to use a flake input
|
||||
lazydev-nvim = inputs.lazydev-nvim;
|
||||
# Or a local path
|
||||
lazydev-nvim = ./lazydev;
|
||||
# Or a npins pin... etc
|
||||
# Or a npins pin nvfetcher source, etc.
|
||||
};
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue