lazy: create LazyFile user event

This commit is contained in:
Ching Pei Yang 2025-03-22 15:02:13 +01:00 committed by Ching Pei Yang
parent 58021beb1c
commit e2d10e8fb2

View file

@ -134,6 +134,15 @@ in {
startPlugins = ["lz-n" "lzn-auto-require"];
optPlugins = pluginPackages;
augroups = [{name = "nvf_lazy_file_hooks";}];
autocmds = [
{
event = ["BufReadPost" "BufNewFile" "BufWritePre"];
group = "nvf_lazy_file_hooks";
command = "doautocmd User LazyFile";
once = true;
}
];
lazy.builtLazyConfig = ''
require('lz.n').load(${toLuaObject lznSpecs})