mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-03-30 18:01:52 +00:00
docs: mention LazyFile
This commit is contained in:
parent
5f99c7f4e5
commit
d105f69921
1 changed files with 19 additions and 0 deletions
|
@ -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"]`
|
||||
|
|
Loading…
Add table
Reference in a new issue