add repolink to neovim
This commit is contained in:
parent
0e43ad825b
commit
d19552a28d
1 changed files with 42 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue