Skip to content

Commit

Permalink
refactor(nvim): move gh integrations to nvim.nix/git.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Oct 17, 2024
1 parent 230837f commit 056c776
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
30 changes: 16 additions & 14 deletions nvim.nix/config/git.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ icons, ... }:
{ pkgs, icons, ... }:

let

Expand All @@ -12,6 +12,10 @@ let
in

{
extraPackages = [ pkgs.gh ];
extraPlugins = [ pkgs.vimPlugins.telescope-github-nvim ];

plugins.telescope.enabledExtensions = [ "gh" ];
plugins.telescope.keymaps.fgc.options.desc = "Lists git commits.";
plugins.telescope.keymaps.fgc.action = "git_commits";
plugins.telescope.keymaps.fgf.options.desc = "Lists buffer's git commits.";
Expand Down Expand Up @@ -83,17 +87,15 @@ in
plugins.neogit.enable = true;
plugins.git-conflict.enable = true;

plugins.gitsigns = {
enable = true;
settings.numhl = true;
settings.linehl = false;
settings.current_line_blame_opts.virt_text = true;
settings.current_line_blame_opts.virt_text_pos = "eol";
settings.current_line_blame_opts.ignore_whitespace = false;
settings.signs.add.text = icons.plus2;
settings.signs.change.text = "┃";
settings.signs.delete.text = icons.minus2;
settings.signs.topdelete.text = "‾";
settings.signs.changedelete.text = "~";
};
plugins.gitsigns.enable = true;
plugins.gitsigns.settings.numhl = true;
plugins.gitsigns.settings.linehl = false;
plugins.gitsigns.settings.current_line_blame_opts.virt_text = true;
plugins.gitsigns.settings.current_line_blame_opts.virt_text_pos = "eol";
plugins.gitsigns.settings.current_line_blame_opts.ignore_whitespace = false;
plugins.gitsigns.settings.signs.add.text = icons.plus2;
plugins.gitsigns.settings.signs.change.text = "┃";
plugins.gitsigns.settings.signs.delete.text = icons.minus2;
plugins.gitsigns.settings.signs.topdelete.text = "‾";
plugins.gitsigns.settings.signs.changedelete.text = "~";
}
9 changes: 0 additions & 9 deletions nvim.nix/config/navigations.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
icons,
helpers,
pkgs,
...
}:

Expand All @@ -16,10 +15,6 @@ in
{
clipboard.register = "unnamed";

extraPackages = [ pkgs.gh ];
extraPlugins = [ pkgs.vimPlugins.telescope-github-nvim ];

plugins.telescope.enabledExtensions = [ "gh" ];
plugins.telescope.enable = true;
plugins.telescope.keymaps.ff.options.desc = "Find by files";
plugins.telescope.keymaps.ff.action = "find_files";
Expand Down Expand Up @@ -65,10 +60,6 @@ in
mode = "n";
}

{
__unkeyed-1 = "<c->";
mode = "n";
}
];

plugins.which-key.settings.spec = [
Expand Down

0 comments on commit 056c776

Please sign in to comment.