Compare commits

...

3 commits

Author SHA1 Message Date
Geoffrey Frogeye 9c6a2f69f0
vim/git: Use gitlinker 2024-01-26 22:02:25 +01:00
Geoffrey Frogeye 85cd61d206
thefuck: Added
Mostly as an experiment for now.
2024-01-26 18:38:28 +01:00
Geoffrey Frogeye ffd871299b
Update nixpkgs 2024-01-26 18:37:56 +01:00
3 changed files with 36 additions and 25 deletions

View file

@ -398,11 +398,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1705183652,
"narHash": "sha256-rnfkyUH0x72oHfiSDhuCHDHg3gFgF+lF8zkkg5Zihsw=",
"lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "428544ae95eec077c7f823b422afae5f174dee4b",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"type": "github"
},
"original": {
@ -452,16 +452,18 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"dirtyRev": "c96d7b46d05a78e695ed1c725d1596b65509b4f9-dirty",
"dirtyShortRev": "c96d7b46-dirty",
"lastModified": 1702044539,
"lastModified": 1705700164,
"narHash": "sha256-YAWtzc+5KDOHDGz/NBB7ysIusXbYYKtsbDOsRhSWKYk=",
"type": "git",
"url": "file:/home/geoffrey/nixvim"
"owner": "GeoffreyFrogeye",
"repo": "nixvim",
"rev": "2e5f7781fccba0472277cad5d383d10d50772234",
"type": "github"
},
"original": {
"type": "git",
"url": "file:/home/geoffrey/nixvim"
"owner": "GeoffreyFrogeye",
"ref": "frogeye-23.11",
"repo": "nixvim",
"type": "github"
}
},
"nmd": {

View file

@ -58,6 +58,11 @@
newestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | tail'';
oldestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | head'';
};
thefuck = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
lsd = {
enable = true;
settings = {

View file

@ -2,26 +2,30 @@
{
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
# TODO Investigate gitlinker instead
keymaps = [
{
mode = [ "n" ];
key = "gG";
action = ''<cmd>lua require"gitlinker".get_buf_range_url("n")<cr>'';
}
{
mode = [ "v" ];
key = "gG";
action = ''<cmd>lua require"gitlinker".get_buf_range_url("v")<cr>'';
}
];
plugins = {
fugitive.enable = true; # Git basics
gitsigns.enable = true; # Show changed lines in the gutter
gitlinker = {
enable = true; # Copy URL of forge corresponding to cursor
callbacks = {
"code.techinc.nl" = "get_gitea_type_url";
"git.frogeye.fr" = "get_gitea_type_url";
};
mappings = null; # This option doesn't work, hence manual mappings
};
};
};
};
options.frogeye.vim.fugitive = {
gitlab_domains = lib.mkOption {
default = { };
type = lib.types.listOf lib.types.str;
};
};
}