This commit is contained in:
isaacST08 2025-03-23 19:54:58 -06:00
commit d8829a9de9
41 changed files with 1031 additions and 337 deletions

View file

@ -67,7 +67,7 @@ of individual sections of configuration as needed. nvf provides helper functions
in the extended library, usually under `inputs.nvf.lib.nvim.dag` that you may
use.
Please refer to the [DAG section](/index.xhtml#ch-dag-entries) in the nvf manual
Please refer to the [DAG section](#ch-dag-entries) in the nvf manual
to find out more about the DAG system.
:::

View file

@ -38,3 +38,22 @@ As of version **0.7**, we exposed an API for configuring lazy-loaded plugins via
};
}
```
## LazyFile event {#sec-lazyfile-event}
You can use the `LazyFile` user event to load a plugin when a file is opened:
```nix
{
config.vim.lazy.plugins = {
"aerial.nvim" = {
package = pkgs.vimPlugins.aerial-nvim;
event = [{event = "User"; pattern = "LazyFile";}];
# ...
};
};
}
```
You can consider `LazyFile` as an alias to
`["BufReadPost" "BufNewFile" "BufWritePre"]`