Merge pull request #28 from NotAShelf/feature/diffview.nvim

Implement diffview.nvim
This commit is contained in:
NotAShelf 2023-03-01 09:14:13 +00:00 committed by GitHub
commit d327f2acdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 0 deletions

View file

@ -140,6 +140,7 @@ inputs: let
colorizer.enable = true;
icon-picker.enable = true;
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
diffview-nvim.enable = true;
};
vim.notes = {

View file

@ -272,6 +272,22 @@
"type": "github"
}
},
"diffview-nvim": {
"flake": false,
"locked": {
"lastModified": 1677593773,
"narHash": "sha256-CMURShXn0RjZW3dc96o1usaLwWC+gOPAkIn3D9YPyBg=",
"owner": "sindrets",
"repo": "diffview.nvim",
"rev": "009beb8054e510e7e2df122ee3ddb2b46bef542b",
"type": "github"
},
"original": {
"owner": "sindrets",
"repo": "diffview.nvim",
"type": "github"
}
},
"dirt-samples-src": {
"flake": false,
"locked": {
@ -1235,6 +1251,7 @@
"copilot-lua": "copilot-lua",
"crates-nvim": "crates-nvim",
"dashboard-nvim": "dashboard-nvim",
"diffview-nvim": "diffview-nvim",
"dressing-nvim": "dressing-nvim",
"fidget-nvim": "fidget-nvim",
"flake-parts": "flake-parts",

View file

@ -345,6 +345,11 @@
flake = false;
};
diffview-nvim = {
url = "github:sindrets/diffview.nvim";
flake = false;
};
venn-nvim = {
url = "github:jbyuki/venn.nvim";
flake = false;

View file

@ -70,6 +70,7 @@ with lib; let
"kommentary"
"mind-nvim"
"fidget-nvim"
"diffview-nvim"
];
# You can either use the name of the plugin or a package.
pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package));

View file

@ -7,5 +7,6 @@ _: {
./icon-picker
./telescope
./venn
./diffview
];
}

View file

@ -0,0 +1,21 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.diffview-nvim;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"diffview-nvim"
"plenary-nvim"
];
vim.luaConfigRC.diffview-nvim =
nvim.dag.entryAnywhere ''
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./config.nix
./diffview.nix
];
}

View file

@ -0,0 +1,14 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.diffview-nvim;
in {
options.vim.utility.diffview-nvim = {
enable = mkEnableOption "Enable diffview-nvim";
};
}