add repolink to neovim

This commit is contained in:
jacekpoz 2024-07-16 12:35:47 +02:00
parent 0e43ad825b
commit d19552a28d
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -69,6 +69,48 @@ in {
extraPlugins = with pkgs.vimPlugins; {
zen-mode.package = zen-mode-nvim;
unicode.package = unicode-vim;
repolink = {
package = pkgs.stdenv.mkDerivation {
name = "repolink";
src = pkgs.fetchFromGitHub {
owner = "9seconds";
repo = "repolink.nvim";
rev = "55edfedbaef3e894d2ab5107ea7fadc64cb8258d";
hash = "sha256-ykCswLzq38tO0GE4IB0dT3g239qkKpoW+d27sCorR90=";
};
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
};
setup = /*lua*/''
require("repolink").setup({
use_full_commit_hash = true,
url_builders = {
["github"] = require("repolink").url_builder_for_github("https://github.com"),
["gitlab"] = require("repolink").url_builder_for_gitlab("https://gitlab.com"),
["codeberg"] = require("repolink").url_builder_for_gitea("https://codeberg.org"),
["jacekpoz"] = require("repolink").url_builder_for_gitea("https://git.jacekpoz.pl"),
["outfoxxed"] = require("repolink").url_builder_for_gitea("https://git.outfoxxed.me"),
},
custom_url_parser = function(remote_url)
local host, user, project = string.match(
remote_url,
"^([^:]+):([^/]+)/(.+)$"
)
if host then
return host, {
user = user,
project = project
}
end
end
})
'';
};
};
treesitter = {