robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
3b00ddb601
master
1const std =@import ( "std" ); 2const LazyPath =std . Build . LazyPath ; 3 4pub const SourceItem =struct { name : [] u8 , api_export : bool }; 5 6pub fn nvim_gen_runtime ( 7b : * std . Build , 8nlua0 : * std . Build . Step . Compile , 9funcs_data : LazyPath , 10) ! * std . Build . Step . WriteFile { 11const gen_runtime =b . addWriteFiles (); 12 13{ 14const gen_step =b . addRunArtifact ( nlua0 ); 15gen_step . addFileArg ( b . path ( "src/gen/gen_vimvim.lua" )); 16const file =gen_step . addOutputFileArg ( "generated.vim" ); 17_ = gen_runtime . addCopyFile ( file , "syntax/vim/generated.vim" ); 18gen_step . addFileArg ( funcs_data ); 19gen_step . addFileArg ( b . path ( "src/nvim/options.lua" )); 20gen_step . addFileArg ( b . path ( "src/nvim/auevents.lua" )); 21gen_step . addFileArg ( b . path ( "src/nvim/ex_cmds.lua" )); 22gen_step . addFileArg ( b . path ( "src/nvim/vvars.lua" )); 23} 24 25{ 26const install_doc_files =b . addInstallDirectory (.{ . source_dir =b . path ( "runtime/doc" ), . install_dir =. prefix , . install_subdir ="runtime/doc" }); 27gen_runtime . step . dependOn ( & install_doc_files . step ); 28 29const gen_step =b . addRunArtifact ( nlua0 ); 30gen_step . addFileArg ( b . path ( "src/gen/gen_helptags.lua" )); 31const file =gen_step . addOutputFileArg ( "tags" ); 32_ = gen_runtime . addCopyFile ( file , "doc/tags" ); 33gen_step . addDirectoryArg ( b . path ( "runtime/doc" )); 34gen_step . addArg ( "++t" ); 35gen_step . has_side_effects = true ; // workaround: missing detection of input changes 36} 37 38return gen_runtime ; 39}