mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-20 02:18:06 +00:00
docs: update lazy.plugins syntax
This commit is contained in:
parent
d49e46ab16
commit
256a8cf62c
1 changed files with 20 additions and 21 deletions
|
@ -136,30 +136,29 @@ plugins are managed by `lz.n`.
|
|||
let
|
||||
cfg = config.vim.your-plugin;
|
||||
in {
|
||||
vim.lazy.plugins = [
|
||||
{
|
||||
# instead of vim.startPlugins, use this:
|
||||
package = "your-plugin";
|
||||
vim.lazy.plugins.your-plugin = {
|
||||
# instead of vim.startPlugins, use this:
|
||||
package = "your-plugin";
|
||||
|
||||
# if your plugin uses the `require('your-plugin').setup{...}` pattern
|
||||
setupModule = "your-plugin";
|
||||
inherit (cfg) setupOpts;
|
||||
# if your plugin uses the `require('your-plugin').setup{...}` pattern
|
||||
setupModule = "your-plugin";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
# events that trigger this plugin to be loaded
|
||||
events = ["DirChanged"];
|
||||
cmd = ["YourPluginCommand"];
|
||||
# events that trigger this plugin to be loaded
|
||||
events = ["DirChanged"];
|
||||
cmd = ["YourPluginCommand"];
|
||||
|
||||
# keymaps
|
||||
keys = [
|
||||
# we'll cover this in detail in the keymaps section
|
||||
{
|
||||
key = "<leader>d";
|
||||
mode = "n";
|
||||
action = ":YourPluginCommand";
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
# keymaps
|
||||
keys = [
|
||||
# we'll cover this in detail in the keymaps section
|
||||
{
|
||||
key = "<leader>d";
|
||||
mode = "n";
|
||||
action = ":YourPluginCommand";
|
||||
}
|
||||
];
|
||||
};
|
||||
;
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue