pkgs(nixvim): Add vim-startuptime plugin for profile the startup time

This commit is contained in:
ulic-youthlic 2025-07-13 06:04:55 +08:00
parent cf90eede7e
commit 745a964d79
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 64 additions and 0 deletions

View file

@ -130,6 +130,27 @@
},
"version": "Serif2.003"
},
"nvim_vim-startuptime": {
"cargoLocks": null,
"date": "2025-02-17",
"extract": null,
"name": "nvim_vim-startuptime",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "dstein64",
"repo": "vim-startuptime",
"rev": "b6f0d93f6b8cf6eee0b4c94450198ba2d6a05ff6",
"sha256": "sha256-0YLDkU1y89O5z7tgxaH5USQpJDfTuN0fsPJOAp6pa5Y=",
"sparseCheckout": [],
"type": "github"
},
"version": "b6f0d93f6b8cf6eee0b4c94450198ba2d6a05ff6"
},
"radicle-ci-broker": {
"cargoLocks": null,
"date": "2025-06-27",

View file

@ -82,6 +82,18 @@
sha256 = "sha256-mfbBSdJrUCZiUUmsmndtEW6H3z6KfBn+dEftBySf2j4=";
};
};
nvim_vim-startuptime = {
pname = "nvim_vim-startuptime";
version = "b6f0d93f6b8cf6eee0b4c94450198ba2d6a05ff6";
src = fetchFromGitHub {
owner = "dstein64";
repo = "vim-startuptime";
rev = "b6f0d93f6b8cf6eee0b4c94450198ba2d6a05ff6";
fetchSubmodules = false;
sha256 = "sha256-0YLDkU1y89O5z7tgxaH5USQpJDfTuN0fsPJOAp6pa5Y=";
};
date = "2025-02-17";
};
radicle-ci-broker = {
pname = "radicle-ci-broker";
version = "d5f684b2ec12dc875ec0278c8e2fe71faaa88d38";

View file

@ -39,6 +39,7 @@
inherit inputs rootPath;
srcs = self.callPackage (rootPath + "/_sources/generated.nix") {};
inherit (inputs'.nixvim.legacyPackages) makeNixvim makeNixvimWithModule;
inherit (self'.legacyPackages) nixvimPlugins;
});
in
lib.packagesFromDirectoryRecursive {

View file

@ -58,3 +58,7 @@ fetch.url = "http://wallpaper.youthlic.social/hollow-knight-quest.3840x2160.mp4"
src.github = "forfudan/yuhao-ime-release"
fetch.url = "https://github.com/forfudan/yuhao-ime-release/releases/download/$ver/yuhao_star_xingchen_$ver.zip"
url.name = "yustar_$ver.zip"
[nvim_vim-startuptime]
src.git = "https://github.com/dstein64/vim-startuptime.git"
fetch.github = "dstein64/vim-startuptime"

View file

@ -2,9 +2,13 @@
makeNixvimWithModule,
pkgs,
lib,
nixvimPlugins,
}:
makeNixvimWithModule {
inherit pkgs;
extraSpecialArgs = {
inherit nixvimPlugins;
};
module = {
imports = with lib; youthlic.loadImports' ./. (filter (name: !hasSuffix "/package.nix" (toString name)));
enableMan = true;

View file

@ -1,4 +1,15 @@
{
pkgs,
nixvimPlugins,
...
}: {
extraPlugins = [
{
config =
#vim
''
'';
plugin = nixvimPlugins.vim-startuptime;
}
];
}

View file

@ -0,0 +1,11 @@
{
srcs,
vimUtils,
}: let
inherit (srcs.nvim_vim-startuptime) src version date;
in
vimUtils.buildVimPlugin {
pname = "vim-startuptime";
version = "0-unstable-${date}-git${version}";
inherit src;
}