diff --git a/flake.lock b/flake.lock index 0b766fc..f76cb10 100644 --- a/flake.lock +++ b/flake.lock @@ -124,6 +124,38 @@ "type": "github" } }, + "nvim-ts-autotag": { + "flake": false, + "locked": { + "lastModified": 1623246197, + "narHash": "sha256-JUlVY0fOYnCMEMCgI9jKnnxKWse2C+MDyKC0SBj48mw=", + "owner": "windwp", + "repo": "nvim-ts-autotag", + "rev": "0d7f288dae497aae7b7f00a2381fb72f6a489638", + "type": "github" + }, + "original": { + "owner": "windwp", + "repo": "nvim-ts-autotag", + "type": "github" + } + }, + "nvim-ts-context-commentstring": { + "flake": false, + "locked": { + "lastModified": 1622998430, + "narHash": "sha256-RPsM6mcjWtQd0tL1CnGV/72RLXs2Tedd0WWNjNW0jRI=", + "owner": "JoosepAlviste", + "repo": "nvim-ts-context-commentstring", + "rev": "a234c51566bf4042d47328f1dc0e3bb09032adba", + "type": "github" + }, + "original": { + "owner": "JoosepAlviste", + "repo": "nvim-ts-context-commentstring", + "type": "github" + } + }, "obelisk": { "flake": false, "locked": { @@ -226,6 +258,8 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nur": "nur", + "nvim-ts-autotag": "nvim-ts-autotag", + "nvim-ts-context-commentstring": "nvim-ts-context-commentstring", "obelisk": "obelisk", "photoprism-flake": "photoprism-flake", "pre-commit-hooks": "pre-commit-hooks" diff --git a/flake.nix b/flake.nix index d581b7c..f0eb8ab 100644 --- a/flake.nix +++ b/flake.nix @@ -34,13 +34,39 @@ inputs.flake-utils.follows = "flake-utils"; }; + inputs.nvim-ts-autotag = { + url = "github:windwp/nvim-ts-autotag"; + flake = false; + }; + + inputs.nvim-ts-context-commentstring = { + url = "github:JoosepAlviste/nvim-ts-context-commentstring"; + flake = false; + }; + outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur - , neovim, obelisk, photoprism-flake, pre-commit-hooks }: + , neovim, obelisk, photoprism-flake, pre-commit-hooks, nvim-ts-autotag + , nvim-ts-context-commentstring }: let overlays = { - neovim = self: super: { - neovim-nightly = neovim.packages.${self.system}.neovim; - }; + neovim = self: super: + with super.pkgs.vimUtils; { + neovim-nightly = neovim.packages.${self.system}.neovim; + vimPlugins = super.vimPlugins // { + nvim-ts-autotag = buildVimPluginFrom2Nix { + pname = "nvim-ts-autotag"; + version = nvim-ts-autotag.rev; + versionSuffix = "-git"; + src = nvim-ts-autotag; + }; + nvim-ts-context-commentstring = buildVimPluginFrom2Nix { + pname = "nvim-ts-context-commentstring"; + version = nvim-ts-context-commentstring.rev; + versionSuffix = "-git"; + src = nvim-ts-context-commentstring; + }; + }; + }; deconz = self: super: { deconz = self.qt5.callPackage ./pkgs/deconz { }; }; diff --git a/home/editors/neovim/default.nix b/home/editors/neovim/default.nix index ba3fe5a..b685dbc 100644 --- a/home/editors/neovim/default.nix +++ b/home/editors/neovim/default.nix @@ -1,30 +1,6 @@ { config, pkgs, ... }: let - buildVimPluginFrom2Nix = pkgs.vimUtils.buildVimPluginFrom2Nix; - - nvim-ts-autotag = buildVimPluginFrom2Nix { - pname = "nvim-ts-autotag"; - version = "2021-05-09"; - src = pkgs.fetchFromGitHub { - owner = "windwp"; - repo = "nvim-ts-autotag"; - rev = "cb2d352bebaa21c7bed2dc2534d7094e83753e83"; - sha256 = "0ph9v5k3q89rcpakaga5vw1lijmfi7018f9ffg9lr3yl9k8d974c"; - }; - }; - - nvim-ts-context-commentstring = buildVimPluginFrom2Nix { - pname = "nvim-ts-context-commentstring"; - version = "2021-04-17"; - src = pkgs.fetchFromGitHub { - owner = "JoosepAlviste"; - repo = "nvim-ts-context-commentstring"; - rev = "03a9c64d0b4249d91fd371de48bf3f6ac8a22d33"; - sha256 = "1d4yygrz05vnp24bszwncajcksnkg66x0qks7y5398rr675kzl2g"; - }; - }; - vimLua = lua: '' lua << EOF ${lua}