mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
git/neogit: module init
This commit is contained in:
parent
b485040933
commit
94908ffb0a
8 changed files with 83 additions and 3 deletions
|
@ -162,6 +162,7 @@ isMaximal: {
|
||||||
enable = true;
|
enable = true;
|
||||||
gitsigns.enable = true;
|
gitsigns.enable = true;
|
||||||
gitsigns.codeActions.enable = false; # throws an annoying debug message
|
gitsigns.codeActions.enable = false; # throws an annoying debug message
|
||||||
|
neogit.enable = isMaximal;
|
||||||
};
|
};
|
||||||
|
|
||||||
minimap = {
|
minimap = {
|
||||||
|
|
|
@ -433,9 +433,9 @@
|
||||||
|
|
||||||
[solarized.nvim]: https://github.com/maxmx03/solarized.nvim
|
[solarized.nvim]: https://github.com/maxmx03/solarized.nvim
|
||||||
[smart-splits.nvim]: https://github.com/mrjones2014/smart-splits.nvim
|
[smart-splits.nvim]: https://github.com/mrjones2014/smart-splits.nvim
|
||||||
|
[neogit]: https://github.com/NeogitOrg/neogit
|
||||||
|
|
||||||
- Add [solarized.nvim] theme with support for multiple variants
|
- Add [solarized.nvim] theme with support for multiple variants
|
||||||
|
|
||||||
- Add [smart-splits.nvim] for navigating between Neovim windows and terminal multiplexer panes.
|
- Add [smart-splits.nvim] for navigating between Neovim windows and terminal multiplexer panes.
|
||||||
Available at `vim.utility.smart-splits`.
|
Available at `vim.utility.smart-splits`.
|
||||||
|
- Add [neogit], an interactive and powerful Git interface for Neovim, inspired by Magit
|
||||||
|
|
|
@ -6,6 +6,7 @@ in {
|
||||||
./vim-fugitive
|
./vim-fugitive
|
||||||
./git-conflict
|
./git-conflict
|
||||||
./gitlinker-nvim
|
./gitlinker-nvim
|
||||||
|
./neogit
|
||||||
];
|
];
|
||||||
|
|
||||||
options.vim.git = {
|
options.vim.git = {
|
||||||
|
|
|
@ -69,7 +69,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
binds.whichKey.register = pushDownDefault {
|
binds.whichKey.register = pushDownDefault {
|
||||||
"<leader>g" = "+Gitsigns";
|
"<leader>h" = "+Gitsigns";
|
||||||
};
|
};
|
||||||
|
|
||||||
pluginRC.gitsigns = entryAnywhere ''
|
pluginRC.gitsigns = entryAnywhere ''
|
||||||
|
|
39
modules/plugins/git/neogit/config.nix
Normal file
39
modules/plugins/git/neogit/config.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.binds) pushDownDefault mkKeymap;
|
||||||
|
|
||||||
|
cfg = config.vim.git.neogit;
|
||||||
|
|
||||||
|
keys = cfg.mappings;
|
||||||
|
inherit (options.vim.git.neogit) mappings;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["plenary-nvim"];
|
||||||
|
|
||||||
|
lazy.plugins.neogit = {
|
||||||
|
package = "neogit";
|
||||||
|
setupModule = "neogit";
|
||||||
|
inherit (cfg) setupOpts;
|
||||||
|
|
||||||
|
cmd = ["Neogit"];
|
||||||
|
|
||||||
|
keys = [
|
||||||
|
(mkKeymap "n" keys.open "<Cmd>Neogit<CR>" {desc = mappings.open.description;})
|
||||||
|
(mkKeymap "n" keys.commit "<Cmd>Neogit commit<CR>" {desc = mappings.commit.description;})
|
||||||
|
(mkKeymap "n" keys.pull "<Cmd>Neogit pull<CR>" {desc = mappings.pull.description;})
|
||||||
|
(mkKeymap "n" keys.push "<Cmd>Neogit push<CR>" {desc = mappings.push.description;})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
binds.whichKey.register = pushDownDefault {
|
||||||
|
"<leader>g" = "+Git";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/git/neogit/default.nix
Normal file
6
modules/plugins/git/neogit/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./neogit.nix
|
||||||
|
];
|
||||||
|
}
|
17
modules/plugins/git/neogit/neogit.nix
Normal file
17
modules/plugins/git/neogit/neogit.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.git.neogit = {
|
||||||
|
enable = mkEnableOption "An Interactive and powerful Git interface [Neogit]";
|
||||||
|
setupOpts = mkPluginSetupOption "neogit" {};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
open = mkMappingOption "Git Status [Neogit]" "<leader>gs";
|
||||||
|
commit = mkMappingOption "Git Commit [Neogit]" "<leader>gc";
|
||||||
|
pull = mkMappingOption "Git pull [Neogit]" "<leader>gp";
|
||||||
|
push = mkMappingOption "Git push [Neogit]" "<leader>gP";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1530,6 +1530,22 @@
|
||||||
"url": "https://github.com/IogaMaster/neocord/archive/2ebf3792a8100376bb65fd66d5dbf60f50af7529.tar.gz",
|
"url": "https://github.com/IogaMaster/neocord/archive/2ebf3792a8100376bb65fd66d5dbf60f50af7529.tar.gz",
|
||||||
"hash": "1ycx26ppfb5djxji1mwamr7ra29z8sm0fs9a6hhwn0l69x06x353"
|
"hash": "1ycx26ppfb5djxji1mwamr7ra29z8sm0fs9a6hhwn0l69x06x353"
|
||||||
},
|
},
|
||||||
|
"neogit": {
|
||||||
|
"type": "GitRelease",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "NeogitOrg",
|
||||||
|
"repo": "neogit"
|
||||||
|
},
|
||||||
|
"pre_releases": false,
|
||||||
|
"version_upper_bound": null,
|
||||||
|
"release_prefix": null,
|
||||||
|
"submodules": false,
|
||||||
|
"version": "v2.0.0",
|
||||||
|
"revision": "7f97dbfc5af3b898c6660d927c23e3a96a5bd069",
|
||||||
|
"url": "https://api.github.com/repos/NeogitOrg/neogit/tarball/v2.0.0",
|
||||||
|
"hash": "0nyv64ai3765if7bdfyx01a0xmsmhm8cjvxyvh2s40bzvkx8xy17"
|
||||||
|
},
|
||||||
"neorg": {
|
"neorg": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue