docs: fix github link branch (#1300)

Nixvim uses "main" rather than "master".
This commit is contained in:
Matt Sturgeon 2024-03-22 12:00:43 +00:00 committed by GitHub
parent 80a2244afc
commit da7c6c41ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,8 +19,8 @@
nixvimPath = toString ./..; nixvimPath = toString ./..;
gitHubDeclaration = user: repo: subpath: { gitHubDeclaration = user: repo: branch: subpath: {
url = "https://github.com/${user}/${repo}/blob/master/${subpath}"; url = "https://github.com/${user}/${repo}/blob/${branch}/${subpath}";
name = "<${repo}/${subpath}>"; name = "<${repo}/${subpath}>";
}; };
@ -32,10 +32,10 @@
decl: decl:
if lib.hasPrefix nixvimPath (toString decl) if lib.hasPrefix nixvimPath (toString decl)
then then
gitHubDeclaration "nix-community" "nixvim" gitHubDeclaration "nix-community" "nixvim" "main"
(lib.removePrefix "/" (lib.removePrefix nixvimPath (toString decl))) (lib.removePrefix "/" (lib.removePrefix nixvimPath (toString decl)))
else if decl == "lib/modules.nix" else if decl == "lib/modules.nix"
then gitHubDeclaration "NixOS" "nixpkgs" decl then gitHubDeclaration "NixOS" "nixpkgs" "master" decl
else decl else decl
) )
opt.declarations; opt.declarations;