From 47708de24f7c6815699d14b4ad4ef437be867d72 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 23 Mar 2025 16:05:42 +0000 Subject: [PATCH] Deploy PR #734 preview --- docs-preview-734/index.xhtml | 14 +++++++++++++- docs-preview-734/options.html | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs-preview-734/index.xhtml b/docs-preview-734/index.xhtml index f1ae2f2d..b168287a 100644 --- a/docs-preview-734/index.xhtml +++ b/docs-preview-734/index.xhtml @@ -464,7 +464,19 @@ to find out more about the DAG system.

}; }; } - +

LazyFile event

You can use the LazyFile user event to load a plugin when a file is opened:

{
+  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"]

+
+

Non-lazy Method

As of version 0.5, we have a more extensive API for configuring plugins, under vim.extraPlugins. Instead of using DAGs exposed by the library, you may use the extra plugin module as follows:

{
diff --git a/docs-preview-734/options.html b/docs-preview-734/options.html
index 07b6c0b2..8a5ad99e 100644
--- a/docs-preview-734/options.html
+++ b/docs-preview-734/options.html
@@ -21551,7 +21551,7 @@ null or string or list of string

Lazy-load on event

Type: -null or string or list of string or (submodule)

+null or string or (submodule) or list of (string or (submodule))

Default: null