diff --git a/pkgs/applications/editors/vim/plugins/default.nix b/pkgs/applications/editors/vim/plugins/default.nix index eb7c70db0e5d..b699c66b47c8 100644 --- a/pkgs/applications/editors/vim/plugins/default.nix +++ b/pkgs/applications/editors/vim/plugins/default.nix @@ -19,12 +19,15 @@ let initialPackages = self: { }; - plugins = callPackage ./generated.nix { - inherit buildVimPlugin; + luaPackagePlugins = callPackage ./luaPackagePlugins.nix { inherit (neovimUtils) buildNeovimPlugin; }; - extras = callPackage ./extras.nix { + nodePackagePlugins = callPackage ./nodePackagePlugins.nix { + inherit buildVimPlugin; + }; + + plugins = callPackage ./generated.nix { inherit buildVimPlugin; inherit (neovimUtils) buildNeovimPlugin; }; @@ -44,7 +47,8 @@ let in lib.pipe initialPackages [ (extends plugins) - (extends extras) + (extends luaPackagePlugins) + (extends nodePackagePlugins) (extends overrides) (extends aliases) lib.makeExtensible diff --git a/pkgs/applications/editors/vim/plugins/extras.nix b/pkgs/applications/editors/vim/plugins/extras.nix deleted file mode 100644 index a5fbf0acb77e..000000000000 --- a/pkgs/applications/editors/vim/plugins/extras.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ - lib, - buildVimPlugin, - buildNeovimPlugin, - nodePackages, - neovim-unwrapped, -}: -let - luaPackages = neovim-unwrapped.lua.pkgs; -in -self: super: -( - let - nodePackageNames = [ - "coc-cmake" - "coc-docker" - "coc-emmet" - "coc-eslint" - "coc-explorer" - "coc-flutter" - "coc-git" - "coc-go" - "coc-haxe" - "coc-highlight" - "coc-html" - "coc-java" - "coc-jest" - "coc-json" - "coc-lists" - "coc-ltex" - "coc-markdownlint" - "coc-pairs" - "coc-prettier" - "coc-r-lsp" - "coc-rls" - "coc-rust-analyzer" - "coc-sh" - "coc-smartf" - "coc-snippets" - "coc-solargraph" - "coc-spell-checker" - "coc-sqlfluff" - "coc-stylelint" - "coc-sumneko-lua" - "coc-tabnine" - "coc-texlab" - "coc-tsserver" - "coc-ultisnips" - "coc-vetur" - "coc-vimlsp" - "coc-vimtex" - "coc-wxml" - "coc-yaml" - "coc-yank" - ]; - nodePackage2VimPackage = - name: - buildVimPlugin { - pname = name; - inherit (nodePackages.${name}) version meta; - src = "${nodePackages.${name}}/lib/node_modules/${name}"; - }; - in - lib.genAttrs nodePackageNames nodePackage2VimPackage -) -// ( - let - luarocksPackageNames = [ - "fidget-nvim" - "gitsigns-nvim" - "image-nvim" - "lsp-progress-nvim" - "lualine-nvim" - "luasnip" - "lush-nvim" - "lz-n" - "lze" - "lzextras" - "lzn-auto-require" - "middleclass" - "mini-test" - "neorg" - "neotest" - "nui-nvim" - "nvim-cmp" - "nvim-nio" - "nvim-web-devicons" - "oil-nvim" - "orgmode" - "papis-nvim" - "rest-nvim" - "rocks-config-nvim" - "rtp-nvim" - "telescope-manix" - "telescope-nvim" - ]; - toVimPackage = - name: - buildNeovimPlugin { - luaAttr = luaPackages.${name}; - }; - in - lib.genAttrs luarocksPackageNames toVimPackage -) diff --git a/pkgs/applications/editors/vim/plugins/luaPackagePlugins.nix b/pkgs/applications/editors/vim/plugins/luaPackagePlugins.nix new file mode 100644 index 000000000000..b8346defa922 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/luaPackagePlugins.nix @@ -0,0 +1,45 @@ +{ + lib, + buildNeovimPlugin, + neovim-unwrapped, +}: +final: prev: +let + luaPackages = neovim-unwrapped.lua.pkgs; + + luarocksPackageNames = [ + "fidget-nvim" + "gitsigns-nvim" + "image-nvim" + "lsp-progress-nvim" + "lualine-nvim" + "luasnip" + "lush-nvim" + "lz-n" + "lze" + "lzextras" + "lzn-auto-require" + "middleclass" + "mini-test" + "neorg" + "neotest" + "nui-nvim" + "nvim-cmp" + "nvim-nio" + "nvim-web-devicons" + "oil-nvim" + "orgmode" + "papis-nvim" + "rest-nvim" + "rocks-config-nvim" + "rtp-nvim" + "telescope-manix" + "telescope-nvim" + ]; +in +lib.genAttrs luarocksPackageNames ( + name: + buildNeovimPlugin { + luaAttr = luaPackages.${name}; + } +) diff --git a/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix b/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix new file mode 100644 index 000000000000..3856a7be1958 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix @@ -0,0 +1,58 @@ +{ + lib, + buildVimPlugin, + nodePackages, +}: +final: prev: +let + nodePackageNames = [ + "coc-cmake" + "coc-docker" + "coc-emmet" + "coc-eslint" + "coc-explorer" + "coc-flutter" + "coc-git" + "coc-go" + "coc-haxe" + "coc-highlight" + "coc-html" + "coc-java" + "coc-jest" + "coc-json" + "coc-lists" + "coc-ltex" + "coc-markdownlint" + "coc-pairs" + "coc-prettier" + "coc-r-lsp" + "coc-rls" + "coc-rust-analyzer" + "coc-sh" + "coc-smartf" + "coc-snippets" + "coc-solargraph" + "coc-spell-checker" + "coc-sqlfluff" + "coc-stylelint" + "coc-sumneko-lua" + "coc-tabnine" + "coc-texlab" + "coc-tsserver" + "coc-ultisnips" + "coc-vetur" + "coc-vimlsp" + "coc-vimtex" + "coc-wxml" + "coc-yaml" + "coc-yank" + ]; +in +lib.genAttrs nodePackageNames ( + name: + buildVimPlugin { + pname = name; + inherit (nodePackages.${name}) version meta; + src = "${nodePackages.${name}}/lib/node_modules/${name}"; + } +)