lazy: create LazyFile user event

This commit is contained in:
Ching Pei Yang 2025-03-22 15:02:13 +01:00 committed by NotAShelf
parent 297ac641ed
commit e8dd47bbd0
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF

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})