From b1a6d5016a90f874d5b21875bd99e4aeee20450d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 14:36:40 +0200 Subject: [PATCH] feat(nvim): add gitignore nvim --- flake.lock | 17 +++++++++++++++++ flake.nix | 3 +++ .../programs/nvim/plugins/gitignore-nvim.lua | 3 +++ overlays/vimPlugins.nix | 12 +++++++++--- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 modules/programs/nvim/plugins/gitignore-nvim.lua diff --git a/flake.lock b/flake.lock index 384f5f1..3121f1b 100644 --- a/flake.lock +++ b/flake.lock @@ -370,6 +370,22 @@ "type": "github" } }, + "gitignore-nvim": { + "flake": false, + "locked": { + "lastModified": 1680653909, + "narHash": "sha256-H6IXZTskIAOmp3U57NIT4Of45xXqrX/6VRm1s28S89Y=", + "owner": "wintermute-cell", + "repo": "gitignore.nvim", + "rev": "b61e4a50b78f9a3702a4ed168ab6c9ceba5f6299", + "type": "github" + }, + "original": { + "owner": "wintermute-cell", + "repo": "gitignore.nvim", + "type": "github" + } + }, "gitignore_2": { "inputs": { "nixpkgs": [ @@ -852,6 +868,7 @@ "copilot-lua": "copilot-lua", "emacs": "emacs", "flake-utils": "flake-utils_3", + "gitignore-nvim": "gitignore-nvim", "home-manager": "home-manager", "howdy": "howdy", "hypr-contrib": "hypr-contrib", diff --git a/flake.nix b/flake.nix index 720ca78..96aa0d0 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,9 @@ comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; comment-box-nvim.flake = false; + gitignore-nvim.url = "github:wintermute-cell/gitignore.nvim"; + gitignore-nvim.flake = false; + attic.url = "github:zhaofengli/attic"; attic.inputs.nixpkgs.follows = "nixpkgs"; attic.inputs.nixpkgs-stable.follows = "stable"; diff --git a/modules/programs/nvim/plugins/gitignore-nvim.lua b/modules/programs/nvim/plugins/gitignore-nvim.lua new file mode 100644 index 0000000..9a994df --- /dev/null +++ b/modules/programs/nvim/plugins/gitignore-nvim.lua @@ -0,0 +1,3 @@ +require("which-key").register({ + i = { "Gitignore", "Create .gitignore" }, +}, { prefix = "g" }) diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 52630d0..e065626 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -1,6 +1,6 @@ { inputs, lib }: -final: prev: +_: prev: with lib.my; { vimPlugins = prev.vimPlugins // { @@ -16,12 +16,12 @@ with lib.my; src = inputs.smartcolumn-nvim; }; - copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (old: { + copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (_: { version = mkVersionInput inputs.copilot-lua; src = inputs.copilot-lua; }); - lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (old: { + lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (_: { version = mkVersionInput inputs.lspsaga-nvim; src = inputs.lspsaga-nvim; }); @@ -37,5 +37,11 @@ with lib.my; version = mkVersionInput inputs.comment-box-nvim; src = inputs.comment-box-nvim; }; + + gitignore-nvim = prev.vimUtils.buildVimPluginFrom2Nix { + pname = "gitignore-nvim"; + version = mkVersionInput inputs.gitignore-nvim; + src = inputs.gitignore-nvim; + }; }; }