From 8a6cdf76320f24c57d4751250b334ab343398514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 5 Apr 2023 08:51:06 +0200 Subject: [PATCH] feat(nvim): add comment-box.nvim --- flake.lock | 16 +++++++ flake.nix | 44 ++++++++++++------- .../nvim/plugins/comment-box-nvim.lua | 1 + overlays/vimPlugins.nix | 6 +++ 4 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 modules/programs/nvim/plugins/comment-box-nvim.lua diff --git a/flake.lock b/flake.lock index a20463e..ef05e23 100644 --- a/flake.lock +++ b/flake.lock @@ -98,6 +98,22 @@ "type": "github" } }, + "comment-box-nvim": { + "flake": false, + "locked": { + "lastModified": 1678772374, + "narHash": "sha256-hD9eCcrDsispi+Nvwjy/MlNW0UmFfSbh8arQpCjeneM=", + "owner": "LudoPinelli", + "repo": "comment-box.nvim", + "rev": "6672213bd5d2625a666a297b66307967effa50bc", + "type": "github" + }, + "original": { + "owner": "LudoPinelli", + "repo": "comment-box.nvim", + "type": "github" + } + }, "copilot-lua": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index f0b79cc..85c86a4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,11 @@ { description = "My awesome system config"; - ############## - ### Inputs ### - ############## - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Inputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ inputs = { master.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; @@ -66,12 +67,20 @@ advanced-git-search-nvim.url = "github:aaronhallaert/advanced-git-search.nvim"; advanced-git-search-nvim.flake = false; + comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; + comment-box-nvim.flake = false; + attic.url = "github:zhaofengli/attic"; attic.inputs.nixpkgs.follows = "nixpkgs"; attic.inputs.nixpkgs-stable.follows = "stable"; attic.inputs.flake-utils.follows = "flake-utils"; }; + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Outputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ outputs = inputs@{ self, nixpkgs, utils, ... }: utils.lib.mkFlake { @@ -84,10 +93,11 @@ lib = nixpkgs.lib.extend (self: super: { my = import ./lib { lib = self; }; }); - ################ - ### Overlays ### - ################ - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Overlays ║ + ╚══════════════════════════════════════════════════════════╝ + */ overlay = import ./overlays { inherit inputs; inherit (self) lib; @@ -108,10 +118,11 @@ overlays.default = self.overlay; - ############### - ### Modules ### - ############### - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Modules ║ + ╚══════════════════════════════════════════════════════════╝ + */ nixosModules = utils.lib.exportModules [ ./modules/profiles/base.nix ./modules/profiles/gaming.nix @@ -148,10 +159,11 @@ self.nixosModules.gaming ]; - ############### - ### Outputs ### - ############### - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Other Outputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ outputsBuilder = channels: with channels.nixpkgs; { devShells.default = mkShell { diff --git a/modules/programs/nvim/plugins/comment-box-nvim.lua b/modules/programs/nvim/plugins/comment-box-nvim.lua new file mode 100644 index 0000000..e002043 --- /dev/null +++ b/modules/programs/nvim/plugins/comment-box-nvim.lua @@ -0,0 +1 @@ +require("comment-box").setup() diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index b9b6a4c..52630d0 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -31,5 +31,11 @@ with lib.my; version = mkVersionInput inputs.advanced-git-search-nvim; src = inputs.advanced-git-search-nvim; }; + + comment-box-nvim = prev.vimUtils.buildVimPluginFrom2Nix { + pname = "comment-box-nvim"; + version = mkVersionInput inputs.comment-box-nvim; + src = inputs.comment-box-nvim; + }; }; }