vim: Configure fugitive-gitlab

This commit is contained in:
Geoffrey Frogeye 2024-01-18 22:49:46 +01:00
parent 46db2dd34f
commit fdf6725dc9
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 28 additions and 23 deletions

26
hm/vim/git.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, lib, config, ... }:
{
config = {
programs.nixvim = {
extraConfigVim = ''
let g:fugitive_gitlab_domains = [${
lib.strings.concatStringsSep ", " (
map (d: "'${d}'") config.frogeye.vim.fugitive.gitlab_domains
)}]
'';
extraPlugins = with pkgs.vimPlugins; [
fugitive-gitlab-vim # Open files in GitLab
];
plugins = {
fugitive.enable = true; # Git basics
gitsigns.enable = true; # Show changed lines in the gutter
};
};
};
options.frogeye.vim.fugitive = {
gitlab_domains = lib.mkOption {
default = { };
type = lib.types.listOf lib.types.str;
};
};
}