vimPlugins: move extras to separate files per source

Make it more obvious where certain plugins come from.

+111 -108
+8 -4
pkgs/applications/editors/vim/plugins/default.nix
··· 19 19 20 20 initialPackages = self: { }; 21 21 22 - plugins = callPackage ./generated.nix { 22 + luaPackagePlugins = callPackage ./luaPackagePlugins.nix { 23 + inherit (neovimUtils) buildNeovimPlugin; 24 + }; 25 + 26 + nodePackagePlugins = callPackage ./nodePackagePlugins.nix { 23 27 inherit buildVimPlugin; 24 - inherit (neovimUtils) buildNeovimPlugin; 25 28 }; 26 29 27 - extras = callPackage ./extras.nix { 30 + plugins = callPackage ./generated.nix { 28 31 inherit buildVimPlugin; 29 32 inherit (neovimUtils) buildNeovimPlugin; 30 33 }; ··· 44 47 in 45 48 lib.pipe initialPackages [ 46 49 (extends plugins) 47 - (extends extras) 50 + (extends luaPackagePlugins) 51 + (extends nodePackagePlugins) 48 52 (extends overrides) 49 53 (extends aliases) 50 54 lib.makeExtensible
-104
pkgs/applications/editors/vim/plugins/extras.nix
··· 1 - { 2 - lib, 3 - buildVimPlugin, 4 - buildNeovimPlugin, 5 - nodePackages, 6 - neovim-unwrapped, 7 - }: 8 - let 9 - luaPackages = neovim-unwrapped.lua.pkgs; 10 - in 11 - self: super: 12 - ( 13 - let 14 - nodePackageNames = [ 15 - "coc-cmake" 16 - "coc-docker" 17 - "coc-emmet" 18 - "coc-eslint" 19 - "coc-explorer" 20 - "coc-flutter" 21 - "coc-git" 22 - "coc-go" 23 - "coc-haxe" 24 - "coc-highlight" 25 - "coc-html" 26 - "coc-java" 27 - "coc-jest" 28 - "coc-json" 29 - "coc-lists" 30 - "coc-ltex" 31 - "coc-markdownlint" 32 - "coc-pairs" 33 - "coc-prettier" 34 - "coc-r-lsp" 35 - "coc-rls" 36 - "coc-rust-analyzer" 37 - "coc-sh" 38 - "coc-smartf" 39 - "coc-snippets" 40 - "coc-solargraph" 41 - "coc-spell-checker" 42 - "coc-sqlfluff" 43 - "coc-stylelint" 44 - "coc-sumneko-lua" 45 - "coc-tabnine" 46 - "coc-texlab" 47 - "coc-tsserver" 48 - "coc-ultisnips" 49 - "coc-vetur" 50 - "coc-vimlsp" 51 - "coc-vimtex" 52 - "coc-wxml" 53 - "coc-yaml" 54 - "coc-yank" 55 - ]; 56 - nodePackage2VimPackage = 57 - name: 58 - buildVimPlugin { 59 - pname = name; 60 - inherit (nodePackages.${name}) version meta; 61 - src = "${nodePackages.${name}}/lib/node_modules/${name}"; 62 - }; 63 - in 64 - lib.genAttrs nodePackageNames nodePackage2VimPackage 65 - ) 66 - // ( 67 - let 68 - luarocksPackageNames = [ 69 - "fidget-nvim" 70 - "gitsigns-nvim" 71 - "image-nvim" 72 - "lsp-progress-nvim" 73 - "lualine-nvim" 74 - "luasnip" 75 - "lush-nvim" 76 - "lz-n" 77 - "lze" 78 - "lzextras" 79 - "lzn-auto-require" 80 - "middleclass" 81 - "mini-test" 82 - "neorg" 83 - "neotest" 84 - "nui-nvim" 85 - "nvim-cmp" 86 - "nvim-nio" 87 - "nvim-web-devicons" 88 - "oil-nvim" 89 - "orgmode" 90 - "papis-nvim" 91 - "rest-nvim" 92 - "rocks-config-nvim" 93 - "rtp-nvim" 94 - "telescope-manix" 95 - "telescope-nvim" 96 - ]; 97 - toVimPackage = 98 - name: 99 - buildNeovimPlugin { 100 - luaAttr = luaPackages.${name}; 101 - }; 102 - in 103 - lib.genAttrs luarocksPackageNames toVimPackage 104 - )
+45
pkgs/applications/editors/vim/plugins/luaPackagePlugins.nix
··· 1 + { 2 + lib, 3 + buildNeovimPlugin, 4 + neovim-unwrapped, 5 + }: 6 + final: prev: 7 + let 8 + luaPackages = neovim-unwrapped.lua.pkgs; 9 + 10 + luarocksPackageNames = [ 11 + "fidget-nvim" 12 + "gitsigns-nvim" 13 + "image-nvim" 14 + "lsp-progress-nvim" 15 + "lualine-nvim" 16 + "luasnip" 17 + "lush-nvim" 18 + "lz-n" 19 + "lze" 20 + "lzextras" 21 + "lzn-auto-require" 22 + "middleclass" 23 + "mini-test" 24 + "neorg" 25 + "neotest" 26 + "nui-nvim" 27 + "nvim-cmp" 28 + "nvim-nio" 29 + "nvim-web-devicons" 30 + "oil-nvim" 31 + "orgmode" 32 + "papis-nvim" 33 + "rest-nvim" 34 + "rocks-config-nvim" 35 + "rtp-nvim" 36 + "telescope-manix" 37 + "telescope-nvim" 38 + ]; 39 + in 40 + lib.genAttrs luarocksPackageNames ( 41 + name: 42 + buildNeovimPlugin { 43 + luaAttr = luaPackages.${name}; 44 + } 45 + )
+58
pkgs/applications/editors/vim/plugins/nodePackagePlugins.nix
··· 1 + { 2 + lib, 3 + buildVimPlugin, 4 + nodePackages, 5 + }: 6 + final: prev: 7 + let 8 + nodePackageNames = [ 9 + "coc-cmake" 10 + "coc-docker" 11 + "coc-emmet" 12 + "coc-eslint" 13 + "coc-explorer" 14 + "coc-flutter" 15 + "coc-git" 16 + "coc-go" 17 + "coc-haxe" 18 + "coc-highlight" 19 + "coc-html" 20 + "coc-java" 21 + "coc-jest" 22 + "coc-json" 23 + "coc-lists" 24 + "coc-ltex" 25 + "coc-markdownlint" 26 + "coc-pairs" 27 + "coc-prettier" 28 + "coc-r-lsp" 29 + "coc-rls" 30 + "coc-rust-analyzer" 31 + "coc-sh" 32 + "coc-smartf" 33 + "coc-snippets" 34 + "coc-solargraph" 35 + "coc-spell-checker" 36 + "coc-sqlfluff" 37 + "coc-stylelint" 38 + "coc-sumneko-lua" 39 + "coc-tabnine" 40 + "coc-texlab" 41 + "coc-tsserver" 42 + "coc-ultisnips" 43 + "coc-vetur" 44 + "coc-vimlsp" 45 + "coc-vimtex" 46 + "coc-wxml" 47 + "coc-yaml" 48 + "coc-yank" 49 + ]; 50 + in 51 + lib.genAttrs nodePackageNames ( 52 + name: 53 + buildVimPlugin { 54 + pname = name; 55 + inherit (nodePackages.${name}) version meta; 56 + src = "${nodePackages.${name}}/lib/node_modules/${name}"; 57 + } 58 + )