mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-17 07:43:21 +00:00
Compare commits
4 commits
88393d6a78
...
2d16be3ceb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d16be3ceb |
||
|
|
9e551aa427 |
||
|
|
66a03f53f8 |
||
|
|
e7cc55225a |
2 changed files with 4 additions and 3 deletions
|
|
@ -127,7 +127,7 @@ vim.your-plugin.setupOpts = {
|
||||||
|
|
||||||
## Lazy plugins {#sec-lazy-plugins}
|
## Lazy plugins {#sec-lazy-plugins}
|
||||||
|
|
||||||
If your plugin can be lazy-loaded, you should use `vim.lazy.plugins` to add your plugin. Lazy
|
If the plugin can be lazy-loaded, `vim.lazy.plugins` should be used to add it. Lazy
|
||||||
plugins are managed by `lz.n`.
|
plugins are managed by `lz.n`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
|
|
@ -145,7 +145,7 @@ in {
|
||||||
inherit (cfg) setupOpts;
|
inherit (cfg) setupOpts;
|
||||||
|
|
||||||
# events that trigger this plugin to be loaded
|
# events that trigger this plugin to be loaded
|
||||||
events = ["DirChanged"];
|
event = ["DirChanged"];
|
||||||
cmd = ["YourPluginCommand"];
|
cmd = ["YourPluginCommand"];
|
||||||
|
|
||||||
# keymaps
|
# keymaps
|
||||||
|
|
@ -171,7 +171,7 @@ require('lz.n').load({
|
||||||
require('your-plugin').setup({--[[ your setupOpts ]]})
|
require('your-plugin').setup({--[[ your setupOpts ]]})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
events = {"DirChanged"},
|
event = {"DirChanged"},
|
||||||
cmd = {"YourPluginCommand"},
|
cmd = {"YourPluginCommand"},
|
||||||
keys = {
|
keys = {
|
||||||
{"<leader>d", ":YourPluginCommand", mode = {"n"}},
|
{"<leader>d", ":YourPluginCommand", mode = {"n"}},
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ in {
|
||||||
require('lz.n').load(${toLuaObject lznSpecs})
|
require('lz.n').load(${toLuaObject lznSpecs})
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf (!cfg.enable) {
|
(mkIf (!cfg.enable) {
|
||||||
startPlugins = mapAttrsToList (_: plugin: plugin.package) cfg.plugins;
|
startPlugins = mapAttrsToList (_: plugin: plugin.package) cfg.plugins;
|
||||||
luaConfigPre =
|
luaConfigPre =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue