diff options
Diffstat (limited to 'pkgs/misc/vim-plugins')
-rw-r--r-- | pkgs/misc/vim-plugins/aliases.nix | 14 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/default.nix | 1 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/deprecated.json | 18 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/generated.nix | 370 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/overrides.nix | 31 | ||||
-rwxr-xr-x | pkgs/misc/vim-plugins/update.py | 102 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-plugin-names | 60 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 19 |
8 files changed, 392 insertions, 223 deletions
diff --git a/pkgs/misc/vim-plugins/aliases.nix b/pkgs/misc/vim-plugins/aliases.nix index cfdd629369c03..4cfb6ccd372fe 100644 --- a/pkgs/misc/vim-plugins/aliases.nix +++ b/pkgs/misc/vim-plugins/aliases.nix @@ -30,12 +30,17 @@ let (removeRecurseForDerivations (checkInPkgs n alias))) aliases; -in -mapAliases { + deprecations = lib.mapAttrs (old: info: + throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}." + ) (builtins.fromJSON (builtins.readFile ./deprecated.json)); + +in +mapAliases ({ airline = vim-airline; alternative = a-vim; # backwards compat, added 2014-10-21 bats = bats-vim; + BufOnly = BufOnly-vim; calendar = calendar-vim; coffee-script = vim-coffee-script; coffeeScript = vim-coffee-script; # backwards compat, added 2014-10-18 @@ -67,7 +72,7 @@ mapAliases { ghc-mod-vim = ghcmod-vim; ghcmod = ghcmod-vim; goyo = goyo-vim; - Gist = gist-vim; + Gist = vim-gist; gitgutter = vim-gitgutter; gundo = gundo-vim; Gundo = gundo-vim; # backwards compat, added 2015-10-03 @@ -133,7 +138,6 @@ mapAliases { wombat256 = wombat256-vim; # backwards compat, added 2015-7-8 yankring = YankRing-vim; Yankring = YankRing-vim; - YouCompleteMe = youcompleteme; xterm-color-table = xterm-color-table-vim; zeavim = zeavim-vim; -} +} // deprecations) diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 20cbbf275c3ab..e6bca9484a260 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -11,7 +11,6 @@ let # TL;DR # * Add your plugin to ./vim-plugin-names - # * sort -udf ./vim-plugin-names > sorted && mv sorted vim-plugin-names # * run ./update.py # # If additional modifications to the build process are required, diff --git a/pkgs/misc/vim-plugins/deprecated.json b/pkgs/misc/vim-plugins/deprecated.json new file mode 100644 index 0000000000000..2c02982f6c609 --- /dev/null +++ b/pkgs/misc/vim-plugins/deprecated.json @@ -0,0 +1,18 @@ +{ + "gist-vim": { + "date": "2020-03-27", + "new": "vim-gist" + }, + "vim-jade": { + "date": "2020-03-27", + "new": "vim-pug" + }, + "vundle": { + "date": "2020-03-27", + "new": "Vundle.vim" + }, + "youcompleteme": { + "date": "2020-03-27", + "new": "YouCompleteMe" + } +} \ No newline at end of file diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 1ce4cf0b7a33e..cc89e861b8a10 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -63,7 +63,7 @@ let pname = "ale"; version = "2020-03-11"; src = fetchFromGitHub { - owner = "w0rp"; + owner = "dense-analysis"; repo = "ale"; rev = "bbe5153fcb36dec9860ced33ae8ff0b5d76ac02a"; sha256 = "1xvmh66lgii98z6f4lk1mjs73ysrvs55xdlcmf224k3as822jmw0"; @@ -125,6 +125,17 @@ let }; }; + ats-vim = buildVimPluginFrom2Nix { + pname = "ats-vim"; + version = "2020-03-03"; + src = fetchFromGitHub { + owner = "vmchale"; + repo = "ats-vim"; + rev = "045fa53f1e0699e980c5c7cd85ecf237ae527ff0"; + sha256 = "1rpqy40kw0cn2h02ly71syvwz5j77xfmrs4mijkn7k0dxgamhy5s"; + }; + }; + auto-git-diff = buildVimPluginFrom2Nix { pname = "auto-git-diff"; version = "2019-09-23"; @@ -224,6 +235,17 @@ let }; }; + BufOnly-vim = buildVimPluginFrom2Nix { + pname = "BufOnly-vim"; + version = "2010-10-18"; + src = fetchFromGitHub { + owner = "vim-scripts"; + repo = "BufOnly.vim"; + rev = "43dd92303979bdb234a3cb2f5662847f7a3affe7"; + sha256 = "1gvpaqvvxjma0dl1zai68bpv42608api4054appwkw9pgczkkcdl"; + }; + }; + calendar-vim = buildVimPluginFrom2Nix { pname = "calendar-vim"; version = "2020-02-14"; @@ -283,7 +305,7 @@ let pname = "clang_complete"; version = "2018-09-19"; src = fetchFromGitHub { - owner = "Rip-Rip"; + owner = "xavierd"; repo = "clang_complete"; rev = "0b98d7533ad967aac3fc4c1a5b0508dafa8a676f"; sha256 = "04mdhc1kbv66blkn6qn98iyj659dac4z49nmpf3anglz8dgcxjgc"; @@ -367,6 +389,17 @@ let }; }; + coc-fzf = buildVimPluginFrom2Nix { + pname = "coc-fzf"; + version = "2020-03-06"; + src = fetchFromGitHub { + owner = "antoinemadec"; + repo = "coc-fzf"; + rev = "ca394b48ac9c78ce95d6cdf3807927a7b6bcfcbe"; + sha256 = "1nsqdp2zma7rlzynm58z43vk5hyrcz8kn7ak32979p4a3fvdyj5c"; + }; + }; + coc-highlight = buildVimPluginFrom2Nix { pname = "coc-highlight"; version = "2019-10-18"; @@ -446,12 +479,12 @@ let coc-metals = buildVimPluginFrom2Nix { pname = "coc-metals"; - version = "2020-03-14"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "ckipp01"; repo = "coc-metals"; - rev = "5b25ccfbb628d6645a20c27dd161b0eae30cf7c8"; - sha256 = "1l62lia82yzx9crlby71i84zp48xjfpkan14va72mg482fl7akfs"; + rev = "a4a82cd0ea5fb71399ca02c03456e9862a54eec8"; + sha256 = "1cj05rzzwacf0c2gk0zhb5ln6pywyc35p2walna80ncpyniyk6k2"; }; }; @@ -534,12 +567,12 @@ let coc-snippets = buildVimPluginFrom2Nix { pname = "coc-snippets"; - version = "2020-03-13"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-snippets"; - rev = "725167224850eed7e792c8fad667b1fb780d8385"; - sha256 = "07crnlh71ycdp1p3xlkmgwq83k12kprain8yhvfzas068f8080hg"; + rev = "881de16a72440c2db7ecc0a68ae0d32a2e5e6864"; + sha256 = "12dwr6r30b78rhj2b19x2l48ri7qzvl2ggr9x6189fhbz4h25rs5"; }; }; @@ -556,12 +589,12 @@ let coc-spell-checker = buildVimPluginFrom2Nix { pname = "coc-spell-checker"; - version = "2020-02-19"; + version = "2020-03-16"; src = fetchFromGitHub { owner = "iamcco"; repo = "coc-spell-checker"; - rev = "c956e288a4d0ffff85e920970776d89dc9c65099"; - sha256 = "00xavbkdx019f6xm6bwf3xqgyvbp3sz7ddnjxfvgah97gwy0q7xs"; + rev = "4a8195f5f22d9d7b42998b7e3b846aa2aef7de52"; + sha256 = "1w8b9icwdam8ljprc8avs5pwdiwmx3j1jxsg03d1lvis9w5xm0cd"; }; }; @@ -611,23 +644,23 @@ let coc-tsserver = buildVimPluginFrom2Nix { pname = "coc-tsserver"; - version = "2020-03-09"; + version = "2020-03-21"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-tsserver"; - rev = "dae0cc36b0245a601d4431ae8dd2319eaa919058"; - sha256 = "1559c0hwyknz1j6vbigywg1fjads4wf8by59z0sri6aah9q77q2z"; + rev = "54bea1ec1ab44802a155f876a4d1cc2c44b2bc42"; + sha256 = "0npjc7c3x9mdqc6asav1f2wwv4p6lb5hk7c1p9b7m3vjg21w0k22"; }; }; coc-vetur = buildVimPluginFrom2Nix { pname = "coc-vetur"; - version = "2019-11-13"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-vetur"; - rev = "8c55c4b867cf2210810133fab6c9382a6f0a14e0"; - sha256 = "1da97d4s2qnysqk21qdm0sgxn03c2cg8vjsajccx538dwiq9f8lb"; + rev = "8072352a371261a922f30a89a6b5c6b07123da84"; + sha256 = "1nb33ndl0pzxw30ibs6p4qaa781cni93ffgypcc69wg4b2r4341a"; }; }; @@ -666,12 +699,12 @@ let coc-yank = buildVimPluginFrom2Nix { pname = "coc-yank"; - version = "2019-12-11"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-yank"; - rev = "79c5a97c9b7122180b869f90f7f011934f3ae8f5"; - sha256 = "0dqz759aw0zlmgwrkv8ia45sdl27hb63ilawm9awzbl99w02psjf"; + rev = "6cb8bc7f2d41b9fb75c797c5805444badeff3dd9"; + sha256 = "0s28684531ihczg5nf2m3f8z1vx9fw4yllfq7jz8g7ifw922ddxb"; }; }; @@ -889,7 +922,7 @@ let pname = "denite-extra"; version = "2019-03-29"; src = fetchFromGitHub { - owner = "chemzqm"; + owner = "neoclide"; repo = "denite-extra"; rev = "af18257544027ce89269dba70c12aba1f5b9e23c"; sha256 = "0bmq9yhylfd3v6bfwvakw3pbsz5kk8wlmmql0yllqayp6410w25a"; @@ -900,7 +933,7 @@ let pname = "denite-git"; version = "2020-03-02"; src = fetchFromGitHub { - owner = "chemzqm"; + owner = "neoclide"; repo = "denite-git"; rev = "88b5323a6fc0ace197eed5205215d80f3b613f91"; sha256 = "0b687i64hr8hll7pv7r1xz906b46cl2q62zm18ipikhkpva6iv13"; @@ -909,12 +942,12 @@ let denite-nvim = buildVimPluginFrom2Nix { pname = "denite-nvim"; - version = "2020-03-08"; + version = "2020-03-21"; src = fetchFromGitHub { owner = "Shougo"; repo = "denite.nvim"; - rev = "b6e2c7df9402f293bad1dc45f5d41b3dc5d8a9b1"; - sha256 = "1rnxaj1ah7k5l2bcc2x7pdlqjb9fki5r732yanp4r3c4mlx28rvp"; + rev = "c3206a06508a197650ee4e1d85da39ff24e3a56b"; + sha256 = "1yy6j5zpja8jr1j8sghwc1l0fkb47r8cvv36ckf75x9x5gpylb5m"; }; }; @@ -933,7 +966,7 @@ let pname = "deoplete-clang"; version = "2019-11-10"; src = fetchFromGitHub { - owner = "zchee"; + owner = "deoplete-plugins"; repo = "deoplete-clang"; rev = "2ea262e98edcb66e828f9077fcc844100320eb63"; sha256 = "1wvk61f8ph2vpl6llzmir3qs3zwaw3lrphs16d1j7ljkdl3bk49k"; @@ -989,7 +1022,7 @@ let pname = "deoplete-go"; version = "2020-01-01"; src = fetchFromGitHub { - owner = "zchee"; + owner = "deoplete-plugins"; repo = "deoplete-go"; rev = "4f1ccd2ed70211fd025d052ec725c0b835bea487"; sha256 = "0zmx98kz6pxfpakizr8xm1nrv1rjr0frz19pkik29mk6aj2b2l08"; @@ -1121,12 +1154,12 @@ let deoplete-nvim = buildVimPluginFrom2Nix { pname = "deoplete-nvim"; - version = "2020-03-11"; + version = "2020-03-21"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete.nvim"; - rev = "494fcd8f311fb394d81921b63797e963c7d642a3"; - sha256 = "101y83y8gq81rijnsmx8z6aznxczjpm1k8iahix606jvsg7znxgf"; + rev = "1439c621dc94016c504e1732ce8270081a42768f"; + sha256 = "1c8qx839zmf52cfazlbbnlhxw6cvnsr3ds0rclawgycbl4s1qy8f"; }; }; @@ -1176,12 +1209,12 @@ let editorconfig-vim = buildVimPluginFrom2Nix { pname = "editorconfig-vim"; - version = "2020-01-31"; + version = "2020-03-15"; src = fetchFromGitHub { owner = "editorconfig"; repo = "editorconfig-vim"; - rev = "21fbc2afe8f30e98b890fb42fc6bc18fc0c0380e"; - sha256 = "1za9q891bxc355qn7v0wasnvf2j6pvhizbp6ycj411hjcw90jwns"; + rev = "c5804257c6b38c5537b71ac91ed051c70eaeb5e5"; + sha256 = "147cqfwzaxwc1fzvynwdvx1cvx6zziamcayrvacqxs7vzjnz8lx7"; fetchSubmodules = true; }; }; @@ -1344,12 +1377,12 @@ let fzf-vim = buildVimPluginFrom2Nix { pname = "fzf-vim"; - version = "2020-03-15"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "junegunn"; repo = "fzf.vim"; - rev = "d16ddcf58dd5d99671474ab9a815c5599e377f4c"; - sha256 = "1ca0fpp55qa1gk6ljfm98042fyz9xpmk2dhqn0pd5iz93kfgn0gy"; + rev = "d4d36b412bdc53e8bdaf0e2714a2227f51781d68"; + sha256 = "0wbq8ckgzw867qqwjzm48jnbgp7yjl1vim7nsyk1wjm2d8z0xjm9"; }; }; @@ -1377,12 +1410,12 @@ let ghcid = buildVimPluginFrom2Nix { pname = "ghcid"; - version = "2020-03-15"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "ndmitchell"; repo = "ghcid"; - rev = "67a947821e3742eb1b4a2267d4d59adbf74ecb02"; - sha256 = "05ch1mxwhjd9ln49sp8xp5f6fgc19i2a9262lfi1kny7i1zrxmg1"; + rev = "63b7813cac0e67cba1ace94b42ef1af291e35e47"; + sha256 = "1p4blbngaxdlacmrqiyxw8y4d0jiws104np68d31mfnvqghylcdy"; }; }; @@ -1397,17 +1430,6 @@ let }; }; - gist-vim = buildVimPluginFrom2Nix { - pname = "gist-vim"; - version = "2020-01-29"; - src = fetchFromGitHub { - owner = "mattn"; - repo = "gist-vim"; - rev = "2158eceb210b0a354bc17aa4144554e5d8bb6c79"; - sha256 = "1dz33c63q7gghz35hyrvbshqw20faccs7bvxlda5w70mkbz9h9c4"; - }; - }; - gitignore-vim = buildVimPluginFrom2Nix { pname = "gitignore-vim"; version = "2014-03-16"; @@ -1452,6 +1474,17 @@ let }; }; + gruvbox-community = buildVimPluginFrom2Nix { + pname = "gruvbox-community"; + version = "2020-02-24"; + src = fetchFromGitHub { + owner = "gruvbox-community"; + repo = "gruvbox"; + rev = "f5711c15480b83378bde13306fa997057c0c81cd"; + sha256 = "0vx289a7av31dxm58c6kmfdnsrwnq1rzj5rwci2pqjdac8ds2qm0"; + }; + }; + gundo-vim = buildVimPluginFrom2Nix { pname = "gundo-vim"; version = "2020-01-15"; @@ -1818,12 +1851,12 @@ let lightline-vim = buildVimPluginFrom2Nix { pname = "lightline-vim"; - version = "2020-02-15"; + version = "2020-03-16"; src = fetchFromGitHub { owner = "itchyny"; repo = "lightline.vim"; - rev = "e8577f3654cac97ee18faae28c80a2200aaaad5a"; - sha256 = "15jw9qvj1dqqfnf52yqvs11r9hzw42aviz89q1gx6yqmvjd5py4v"; + rev = "893bd90787abfec52a2543074e444fc6a9e0cf78"; + sha256 = "0cgzkyhpr1p184yc9b3m259i5mnwdyj5zg80idywvv2gh8phw2y7"; }; }; @@ -2027,12 +2060,12 @@ let neoformat = buildVimPluginFrom2Nix { pname = "neoformat"; - version = "2020-03-03"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "sbdchd"; repo = "neoformat"; - rev = "69140aedb7da5a5a0b25b82e7f756f91d08170ea"; - sha256 = "132ksy20rb01xm18zwwl3lv5zapfhfvaf5zz6md8dnr5hvkvvrgx"; + rev = "d02b169e70bd6d2b2365bf6cda721967616a30bf"; + sha256 = "1cya26wfqc7l7dqy854m4kwrq3w66knmn2cgviqh9cnsjzhwxs0d"; }; }; @@ -2104,12 +2137,12 @@ let neoterm = buildVimPluginFrom2Nix { pname = "neoterm"; - version = "2020-02-15"; + version = "2020-03-16"; src = fetchFromGitHub { owner = "kassio"; repo = "neoterm"; - rev = "dacbae9d844e678c785db7c9d7988df7a405e572"; - sha256 = "03aah6lgygf7rj78kf4rh5hw593l4qi83ivh5amy9yw8lc630pjv"; + rev = "ee8bba435bed2ecadafb97ff00c2b7b07eedc1b4"; + sha256 = "190k2b0nzkkpakkfwbhmnh5q0b9vj882lvvnzw6dyiq5w5z59pxb"; }; }; @@ -2150,7 +2183,7 @@ let pname = "nerdcommenter"; version = "2020-02-19"; src = fetchFromGitHub { - owner = "scrooloose"; + owner = "preservim"; repo = "nerdcommenter"; rev = "c62e618a1ab5a50a4028e3296500ba29d9b033d8"; sha256 = "0w4bxj423dxxkcxnfmipf8x5jfm058rq4g3m98wzcz5zbambv3qs"; @@ -2161,7 +2194,7 @@ let pname = "nerdtree"; version = "2020-02-20"; src = fetchFromGitHub { - owner = "scrooloose"; + owner = "preservim"; repo = "nerdtree"; rev = "e67324fdea7a192c7ce1b4c6b3c3b9f82f11eee7"; sha256 = "0y7hd69k0i21cqgs11n80ljv6cl0gfcjjwa0dvdywpd8mmn1ad4k"; @@ -2236,12 +2269,12 @@ let nvim-gdb = buildVimPluginFrom2Nix { pname = "nvim-gdb"; - version = "2020-03-12"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "sakhnik"; repo = "nvim-gdb"; - rev = "2388fd4a673ac26608c5db570950f3e4edf71ad4"; - sha256 = "0a86l5yn120rn8kz6pfq4j9k9ix3cibysfp2d8rqjz6lndg56cmk"; + rev = "9ea1cd2cd110a8efa40dc893036596b39f979a7a"; + sha256 = "10qcs59r27fkzk0pg90gywbrz7y7b4hvavbws5kx6fjx3h2mbfsh"; }; }; @@ -2258,12 +2291,12 @@ let nvim-lsp = buildVimPluginFrom2Nix { pname = "nvim-lsp"; - version = "2020-03-09"; + version = "2020-03-21"; src = fetchFromGitHub { owner = "neovim"; repo = "nvim-lsp"; - rev = "78b16eb3623c1c0d4433ca8e09c2cb661fa1a852"; - sha256 = "0fgj2yhfcdvpqs7012nwcinlndpfhzfzq9ac7kk0cib4m4vg1zxm"; + rev = "4fe58ec4e1fa3500c7ef98464174bf6c4cb8ce67"; + sha256 = "1xyqbr0f2pgvbbk0cpg92pswavff910hy8rjkm05grhqw43vkzcg"; }; }; @@ -2313,12 +2346,12 @@ let open-browser-github-vim = buildVimPluginFrom2Nix { pname = "open-browser-github-vim"; - version = "2020-02-08"; + version = "2020-03-16"; src = fetchFromGitHub { owner = "tyru"; repo = "open-browser-github.vim"; - rev = "cb1b3b957d391e15eac41a2c9695086472d6638f"; - sha256 = "0sd72arqqk6kpr3mxdvdcqsb0lcf80gbswxzd5piafwidkmk7m5n"; + rev = "db483ae17f02a8561e85b2071b90359a9a3bd18d"; + sha256 = "09x9lfyi9gfhy4m1vp6z1kxpvi31rr8dnlqhh6fgskkziiqch3jw"; }; }; @@ -2447,7 +2480,7 @@ let pname = "purescript-vim"; version = "2018-12-10"; src = fetchFromGitHub { - owner = "raichoo"; + owner = "purescript-contrib"; repo = "purescript-vim"; rev = "67ca4dc4a0291e5d8c8da48bffc0f3d2c9739e7f"; sha256 = "1insh39hzbynr6qxb215qxhpifl5m8i5i0d09a3b6v679i7s11i8"; @@ -2467,12 +2500,12 @@ let quick-scope = buildVimPluginFrom2Nix { pname = "quick-scope"; - version = "2020-03-09"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "unblevable"; repo = "quick-scope"; - rev = "2a12d429144cf083382a87743c1cb658cd314309"; - sha256 = "16cf9jdjkf7igqvf40snq71n52kpszdi76ijhxk03dxgycj0hfkb"; + rev = "49b00ee08176636384c98690a4719565372f68b9"; + sha256 = "0lsmrmjrhyi1rm4sp3hs9lhs8v8ff50zc1gy4bg6gsxw4c1ghl3q"; }; }; @@ -2590,7 +2623,7 @@ let pname = "riv-vim"; version = "2020-02-17"; src = fetchFromGitHub { - owner = "Rykka"; + owner = "gu-fan"; repo = "riv.vim"; rev = "d52844691ca2f139e4b634db65aa49c57a0fc2b3"; sha256 = "0s4jvqwlnmmh2zw9v9rlwynwx44ypdrzhhyfb20sippxg9g6z0c5"; @@ -2821,7 +2854,7 @@ let pname = "sved"; version = "2019-01-25"; src = fetchFromGitHub { - owner = "peder2tm"; + owner = "peterbjorgensen"; repo = "sved"; rev = "3362db72447e8ac812c7299c15ecfc9f41341713"; sha256 = "1r2nv069d6r2q6gbiz795x94mfjm9hnv05zka085hhq9a3yf1pgx"; @@ -2843,7 +2876,7 @@ let pname = "syntastic"; version = "2020-01-29"; src = fetchFromGitHub { - owner = "scrooloose"; + owner = "vim-syntastic"; repo = "syntastic"; rev = "f3766538720116f099a8b1517f76ae2f094afd20"; sha256 = "1bzjav87fcibwlp8siqnx6x8wv8w3mwrrqrd5w19ny9scr5x2a65"; @@ -3051,12 +3084,12 @@ let ultisnips = buildVimPluginFrom2Nix { pname = "ultisnips"; - version = "2020-03-02"; + version = "2020-03-19"; src = fetchFromGitHub { owner = "SirVer"; repo = "ultisnips"; - rev = "e910b4fb9e276d18ed140fc492f30967ef9ace59"; - sha256 = "0fbrwmk4plg1zyz5vyay7jsj240l9p2ksjlp7yjs1g3l7qf71xxz"; + rev = "ee31ea1c7d08ced8577120b4c1d55c5a05351a75"; + sha256 = "01nm3d95qjd2v3j9ln7w52i8bn2fgi5zms9078832w1x4iyb1mwn"; }; }; @@ -3073,12 +3106,12 @@ let unicode-vim = buildVimPluginFrom2Nix { pname = "unicode-vim"; - version = "2020-02-27"; + version = "2020-03-18"; src = fetchFromGitHub { owner = "chrisbra"; repo = "unicode.vim"; - rev = "582b715562c953ea9a1f043443f98793cfbc0d47"; - sha256 = "1wjmdjn129d8p6nrx69xdrrzg05l930a5lfbrvhyic3aiqn5x1mf"; + rev = "fc2e986f34dc6b21e80d54845a7b538003129feb"; + sha256 = "0h76726rnqrdvmm9bpgnrli66rg18b2snw077wz0zvcz7g0l9a24"; }; }; @@ -3370,12 +3403,12 @@ let vim-airline = buildVimPluginFrom2Nix { pname = "vim-airline"; - version = "2020-03-02"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline"; - rev = "4e2546a2098954b74cbc612f573826f13d6fb88e"; - sha256 = "1z1xnvkaz1yjjq87kdyplx0zh0il0qkmr5lzwfq33jcnwlafz6xw"; + rev = "119477060d55bb5de173b28f310d430af5593618"; + sha256 = "0hgq13iigpk8cy0lyamaz135019qbxc5nckgv0363ilhk4k5ilrd"; }; }; @@ -3436,12 +3469,12 @@ let vim-autoformat = buildVimPluginFrom2Nix { pname = "vim-autoformat"; - version = "2020-03-02"; + version = "2020-03-18"; src = fetchFromGitHub { owner = "Chiel92"; repo = "vim-autoformat"; - rev = "b757f58c67908772a17300cf853ed0da653edeb2"; - sha256 = "0cl858hk7gaaxlj22d61mqiaypv76q85srskjay9s3px0mm5fanc"; + rev = "80bda05d0f5383af0a09b9ca4a2918a23d372f60"; + sha256 = "1dgqz73cprn2s3xpdfpyjq7bmwjpdrz8b3kf6mwkajgxjl89sv7m"; }; }; @@ -3568,12 +3601,12 @@ let vim-codefmt = buildVimPluginFrom2Nix { pname = "vim-codefmt"; - version = "2020-02-26"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "google"; repo = "vim-codefmt"; - rev = "6d69f933f243ed3d7797641bd41c0e65d245c931"; - sha256 = "0vzzyz7v03ihky3vx12rji4l1r6vbxgslvc1fvi4dznfqn5m9gfn"; + rev = "d6676620f7a85fa49e8893cad041df59497fd845"; + sha256 = "01wrlq9h2wzngi8qna0zrwycrp0iqp7qsijyby287zbckrs25rnd"; }; }; @@ -3700,12 +3733,12 @@ let vim-cursorword = buildVimPluginFrom2Nix { pname = "vim-cursorword"; - version = "2020-03-10"; + version = "2020-03-19"; src = fetchFromGitHub { owner = "itchyny"; repo = "vim-cursorword"; - rev = "8e859e4c54fda0728e8f0b5cc4f61c7ff193083f"; - sha256 = "0nq7x957xwz6fibb4m4daq2xp74n922lm46117lfhvpa0ii2rz0i"; + rev = "b5f8a4b148b566626210d0c1f6b63036b62322bb"; + sha256 = "0a4gznfxmg7a62xwk4mmjcxykcgmm7mh5vv7n5hskxjczdrvl400"; }; }; @@ -3867,7 +3900,7 @@ let pname = "vim-elixir"; version = "2020-03-11"; src = fetchFromGitHub { - owner = "elixir-lang"; + owner = "elixir-editors"; repo = "vim-elixir"; rev = "088cfc407460dea7b81c10b29db23843f85e7919"; sha256 = "1w9w4arzlbjhd5kcvyv5fykq9djc4n4j1nc75qqlzsfggbjjwhbk"; @@ -4041,11 +4074,11 @@ let vim-fugitive = buildVimPluginFrom2Nix { pname = "vim-fugitive"; - version = "2020-03-12"; + version = "2020-03-22"; src = fetchFromGitHub { owner = "tpope"; repo = "vim-fugitive"; - rev = "9a4d730270882f9d39a411eb126143eda4d46963"; + rev = "0e35c9bbc78159318e7b7ffd228f09a96afb8fde"; sha256 = "098fz3lmfysv6gr5cjwgqsdzxjxygwc0x4ak1sxj3h6djys5x66b"; }; }; @@ -4061,6 +4094,17 @@ let }; }; + vim-gist = buildVimPluginFrom2Nix { + pname = "vim-gist"; + version = "2020-01-29"; + src = fetchFromGitHub { + owner = "mattn"; + repo = "vim-gist"; + rev = "2158eceb210b0a354bc17aa4144554e5d8bb6c79"; + sha256 = "1dz33c63q7gghz35hyrvbshqw20faccs7bvxlda5w70mkbz9h9c4"; + }; + }; + vim-gista = buildVimPluginFrom2Nix { pname = "vim-gista"; version = "2020-01-04"; @@ -4118,12 +4162,12 @@ let vim-go = buildVimPluginFrom2Nix { pname = "vim-go"; - version = "2020-03-15"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "fatih"; repo = "vim-go"; - rev = "14382b346ea03615bfb03115679c8a48bbf03af2"; - sha256 = "0ni9kjqb78jf98v1xwmg6r7inm7qifpf21hnp1n2i65mvnrc4afm"; + rev = "50d52bafa00448ca8cde2b0e05b0fe71c9397762"; + sha256 = "1c8dwllscwxiqp409zy7ajwz84bn8g7p9gldqrhx8i9l7q382z0w"; }; }; @@ -4380,17 +4424,6 @@ let }; }; - vim-jade = buildVimPluginFrom2Nix { - pname = "vim-jade"; - version = "2019-09-23"; - src = fetchFromGitHub { - owner = "digitaltoad"; - repo = "vim-jade"; - rev = "ea39cd942cf3194230cf72bfb838901a5344d3b3"; - sha256 = "07141jkfnaia4ydc6qcg0bc06w720l2lzl7bm4bsjwswqrzmhfam"; - }; - }; - vim-janah = buildVimPluginFrom2Nix { pname = "vim-janah"; version = "2018-10-01"; @@ -4502,6 +4535,17 @@ let }; }; + vim-kitty-navigator = buildVimPluginFrom2Nix { + pname = "vim-kitty-navigator"; + version = "2019-11-04"; + src = fetchFromGitHub { + owner = "knubie"; + repo = "vim-kitty-navigator"; + rev = "c32357892f10117291461631d51a6bfd20e72b9a"; + sha256 = "0zqvcnbns0vbxkqr0mpiapql8cvp54nn5a6mwc7l24jr6plhiwmn"; + }; + }; + vim-lastplace = buildVimPluginFrom2Nix { pname = "vim-lastplace"; version = "2020-01-20"; @@ -4614,23 +4658,23 @@ let vim-lsc = buildVimPluginFrom2Nix { pname = "vim-lsc"; - version = "2020-02-11"; + version = "2020-03-22"; src = fetchFromGitHub { owner = "natebosch"; repo = "vim-lsc"; - rev = "62c6f6aa227b1b3ef5e7cf7df9f0a9c1d855d7fe"; - sha256 = "1qimz08rqm4ch6dr0znwxl328593kmz0yxdqq15g1yrw4ig0fi22"; + rev = "3dd7a19e8689847956266e0be1bbfb4ca12da746"; + sha256 = "0dj1b8v9iz67m833x1z3s7jac0jpfxgs43ylc6m0v3al67qcb0mj"; }; }; vim-maktaba = buildVimPluginFrom2Nix { pname = "vim-maktaba"; - version = "2019-08-14"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "google"; repo = "vim-maktaba"; - rev = "ed4357d2caf1d04bd229a24191098759f94b2e25"; - sha256 = "0zz048nbp2dc361g7zr3qdn1n506ym82d6igaz0qv37ani85fq6v"; + rev = "b31525d7f6170c68f900abe24748ac9fbaf1ee4d"; + sha256 = "0d6qss18dq36hvxv1if1aaylljsnp2isxajb5xh4zr4cxarrzbfi"; }; }; @@ -4867,12 +4911,12 @@ let vim-pandoc = buildVimPluginFrom2Nix { pname = "vim-pandoc"; - version = "2020-03-13"; + version = "2020-03-20"; src = fetchFromGitHub { owner = "vim-pandoc"; repo = "vim-pandoc"; - rev = "9c12affb112cf5bdbc74f6492f019dec539756ee"; - sha256 = "199mr1b740vd4rqjkpgwx539flyaqm7bi05fknzkyxizn8180xzw"; + rev = "c473c298d570622d520f455698a95356e55d6dcf"; + sha256 = "1j4plsm7md6yhis8bmgznwln12gnnm0lg9wvxgydqd6wxrc6hfnd"; }; }; @@ -5043,12 +5087,23 @@ let vim-ps1 = buildVimPluginFrom2Nix { pname = "vim-ps1"; - version = "2020-03-12"; + version = "2020-03-15"; src = fetchFromGitHub { owner = "PProvost"; repo = "vim-ps1"; - rev = "2008b24c1d740543041d1de9fa4036a35cd21e16"; - sha256 = "0q5njcfc4zlb2z5bzr5jsmqfqnp96c83pwwayfcms8sqczj2w13v"; + rev = "2decf51f19834434e34f1a8d79056b7014120ca3"; + sha256 = "1hph6w6mrlma96ys1nk9v46hscmplkpp2y7xq1ld2bnfs4wab3v8"; + }; + }; + + vim-pug = buildVimPluginFrom2Nix { + pname = "vim-pug"; + version = "2019-09-23"; + src = fetchFromGitHub { + owner = "digitaltoad"; + repo = "vim-pug"; + rev = "ea39cd942cf3194230cf72bfb838901a5344d3b3"; + sha256 = "07141jkfnaia4ydc6qcg0bc06w720l2lzl7bm4bsjwswqrzmhfam"; }; }; @@ -5351,12 +5406,12 @@ let vim-snippets = buildVimPluginFrom2Nix { pname = "vim-snippets"; - version = "2020-03-11"; + version = "2020-03-19"; src = fetchFromGitHub { owner = "honza"; repo = "vim-snippets"; - rev = "8eafafe246152c94b64149dd04d9e03b87527eac"; - sha256 = "1mfw69283w3xk9kawn2ms160sjzmxpfdh4drdis27fg27i58yadd"; + rev = "6e6b69fd5c12d4645225e7a3ba7d9f3414d83d25"; + sha256 = "0hc914c74dy22nm9bx2qd37py8f2xf3ylnfr3v4lvbxpnlpahjjc"; }; }; @@ -5527,12 +5582,12 @@ let vim-test = buildVimPluginFrom2Nix { pname = "vim-test"; - version = "2020-03-14"; + version = "2020-03-21"; src = fetchFromGitHub { - owner = "janko-m"; + owner = "janko"; repo = "vim-test"; - rev = "2e3516833137ffcf6f291854551cfe70c17b1752"; - sha256 = "1hfksbai45c5ql9gvm1fqdfhakm2fvas59jyf71iddsfiha5vv2k"; + rev = "b302a325116d8708dc0721b7cd97ff59536f4e75"; + sha256 = "099dzadzhfkhf92lv5cmfk0iawbp40v1rz9xxp462hxxcn3p3c97"; }; }; @@ -5855,6 +5910,17 @@ let }; }; + vimacs = buildVimPluginFrom2Nix { + pname = "vimacs"; + version = "2016-03-24"; + src = fetchFromGitHub { + owner = "andrep"; + repo = "vimacs"; + rev = "7b8e297722d55089f0f0535fe6422533c98112fb"; + sha256 = "0x92jcpdlvxhhdpwkv7ig9ya7s96yqjy6ms9xnx8djkf12xql16f"; + }; + }; + vimagit = buildVimPluginFrom2Nix { pname = "vimagit"; version = "2020-01-12"; @@ -5945,12 +6011,12 @@ let vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2020-03-15"; + version = "2020-03-21"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "51797cde25904e595da62513b818ab3abc9acd9e"; - sha256 = "0dpcxqrv9jn7d0f2wnnqyj3069wfqg4h70qqqnlq07n4p8yj2rw1"; + rev = "8c59031d50feeec8b4f3549f70f82564975265f0"; + sha256 = "16a7qpp19gci8hq8h2999pwv0gd6x0mqgifv325mlb0jj5lxy7m1"; }; }; @@ -5989,21 +6055,21 @@ let vista-vim = buildVimPluginFrom2Nix { pname = "vista-vim"; - version = "2020-03-15"; + version = "2020-03-17"; src = fetchFromGitHub { owner = "liuchengxu"; repo = "vista.vim"; - rev = "a1e19503ce2f27a98fd6c03202d0651891aadecf"; - sha256 = "19xy5qxizhpnyaqvjayxpmc5hdfixdf84g4ilhagq7isd5l4a1cs"; + rev = "e7b362fffe3a5d1f21bd560d0455e19ff8192997"; + sha256 = "15nmls0m5hajh4k1kjibp299hdhyyjkcax44fmkjq51xlfb1nhc9"; }; }; - vundle = buildVimPluginFrom2Nix { - pname = "vundle"; + Vundle-vim = buildVimPluginFrom2Nix { + pname = "Vundle-vim"; version = "2019-08-17"; src = fetchFromGitHub { - owner = "gmarik"; - repo = "vundle"; + owner = "VundleVim"; + repo = "Vundle.vim"; rev = "b255382d6242d7ea3877bf059d2934125e0c4d95"; sha256 = "0fkmklcq3fgvd6x6irz9bgyvcdaxafykk3k89gsi9p6b0ikw3rw6"; }; @@ -6099,24 +6165,24 @@ let yats-vim = buildVimPluginFrom2Nix { pname = "yats-vim"; - version = "2020-03-02"; + version = "2020-03-21"; src = fetchFromGitHub { owner = "HerringtonDarkholme"; repo = "yats.vim"; - rev = "68ef9623656fe9aaa53c1d9ab906f09c2c095f06"; - sha256 = "0cn1k8lda71vm4gx14ly9gdvk1j17jds0axx9jvjp4w9jid6ksqk"; + rev = "4d3f69a3a5f56bae9475a96c3291ffdcbd9ff0b1"; + sha256 = "0f3dq4lrm9xzh780fd471b7ddibfzb9vfq1k6gn53pmqpiw6a498"; fetchSubmodules = true; }; }; - youcompleteme = buildVimPluginFrom2Nix { - pname = "youcompleteme"; - version = "2020-03-14"; + YouCompleteMe = buildVimPluginFrom2Nix { + pname = "YouCompleteMe"; + version = "2020-03-18"; src = fetchFromGitHub { - owner = "valloric"; - repo = "youcompleteme"; - rev = "3108b9bd4408b2af891eea179108bc9704e7263d"; - sha256 = "0913d0mixhm24mhqgf3cca3p4hglsj23f85m4n4npksiqw91swla"; + owner = "ycm-core"; + repo = "YouCompleteMe"; + rev = "cf4a76acaeed27eb3ca1dca5adf1115b6abbcfa3"; + sha256 = "0si9by2ag2f7xgxidp5215d6wkg1mdhq9j5c4icdpsly9gv3w5s8"; fetchSubmodules = true; }; }; @@ -6158,7 +6224,7 @@ let pname = "zig-vim"; version = "2020-02-10"; src = fetchFromGitHub { - owner = "zig-lang"; + owner = "ziglang"; repo = "zig.vim"; rev = "55b690029791022fd7818ebd0ee395e8976899fe"; sha256 = "10xkrn4yhjda187mpw1y3qw0s6bp7aklk87pansaa3fvysdf3b6c"; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index e4710e27193ca..39596da24bb01 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -393,22 +393,10 @@ self: super: { configurePhase = "cd plugins/nvim"; }); - gist-vim = super.gist-vim.overrideAttrs(old: { + vim-gist = super.vim-gist.overrideAttrs(old: { dependencies = with super; [ webapi-vim ]; }); - gruvbox-community = buildVimPluginFrom2Nix { - pname = "gruvbox-community"; - version = "2019-05-31"; - src = fetchFromGitHub { - owner = "gruvbox-community"; - repo = "gruvbox"; - rev = "e122091dad968a5524f3e8136615a479c7b6f247"; - sha256 = "1hncjyfi1gbw62b2pngy5qxyzibrhbyzgfmm9a58sdh1272l8ls8"; - }; - meta.maintainers = with stdenv.lib.maintainers; [ minijackson ]; - }; - meson = buildVimPluginFrom2Nix { inherit (meson) pname version src; preInstall = "cd data/syntax-highlighting/vim"; @@ -460,6 +448,21 @@ self: super: { }; }); + vimacs = super.vimacs.overrideAttrs(old: { + buildPhase = '' + substituteInPlace bin/vim \ + --replace '/usr/bin/vim' 'vim' \ + --replace '/usr/bin/gvim' 'gvim' + # remove unnecessary duplicated bin wrapper script + rm -r plugin/vimacs + ''; + meta = with stdenv.lib; { + description = "Vim-Improved eMACS: Emacs emulation plugin for Vim"; + homepage = "http://algorithm.com.au/code/vimacs"; + license = licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ millerjason ]; + }; + }); vimshell-vim = super.vimshell-vim.overrideAttrs(old: { dependencies = with super; [ vimproc-vim ]; @@ -640,7 +643,7 @@ self: super: { sourceRoot = "."; }); - youcompleteme = super.youcompleteme.overrideAttrs(old: { + YouCompleteMe = super.YouCompleteMe.overrideAttrs(old: { buildPhase = '' substituteInPlace plugin/youcompleteme.vim \ --replace "'ycm_path_to_python_interpreter', '''" \ diff --git a/pkgs/misc/vim-plugins/update.py b/pkgs/misc/vim-plugins/update.py index 0ef93ac569ab0..bbeef0889f422 100755 --- a/pkgs/misc/vim-plugins/update.py +++ b/pkgs/misc/vim-plugins/update.py @@ -10,12 +10,14 @@ import argparse import functools +import http import json import os import subprocess import sys import traceback import urllib.error +import urllib.parse import urllib.request import xml.etree.ElementTree as ET from datetime import datetime @@ -32,6 +34,7 @@ ATOM_UPDATED = "{http://www.w3.org/2005/Atom}updated" # " ROOT = Path(__file__).parent DEFAULT_IN = ROOT.joinpath("vim-plugin-names") DEFAULT_OUT = ROOT.joinpath("generated.nix") +DEPRECATED = ROOT.joinpath("deprecated.json") import time from functools import wraps @@ -71,9 +74,11 @@ def retry(ExceptionToCheck: Any, tries: int = 4, delay: float = 3, backoff: floa class Repo: - def __init__(self, owner: str, name: str) -> None: + def __init__(self, owner: str, name: str, alias: str) -> None: self.owner = owner self.name = name + self.alias = alias + self.redirect: Dict[str, str] = {} def url(self, path: str) -> str: return urljoin(f"https://github.com/{self.owner}/{self.name}/", path) @@ -96,7 +101,9 @@ class Repo: @retry(urllib.error.URLError, tries=4, delay=3, backoff=2) def latest_commit(self) -> Tuple[str, datetime]: - with urllib.request.urlopen(self.url("commits/master.atom"), timeout=10) as req: + commit_url = self.url("commits/master.atom") + with urllib.request.urlopen(commit_url, timeout=10) as req: + self.check_for_redirect(commit_url, req) xml = req.read() root = ET.fromstring(xml) latest_entry = root.find(ATOM_ENTRY) @@ -111,6 +118,19 @@ class Repo: updated = datetime.strptime(updated_tag.text, "%Y-%m-%dT%H:%M:%SZ") return Path(str(url.path)).name, updated + def check_for_redirect(self, url: str, req: http.client.HTTPResponse): + response_url = req.geturl() + if url != response_url: + new_owner, new_name = ( + urllib.parse.urlsplit(response_url).path.strip("/").split("/")[:2] + ) + end_line = "\n" if self.alias is None else f" as {self.alias}\n" + plugin_line = "{owner}/{name}" + end_line + + old_plugin = plugin_line.format(owner=self.owner, name=self.name) + new_plugin = plugin_line.format(owner=new_owner, name=new_name) + self.redirect[old_plugin] = new_plugin + def prefetch_git(self, ref: str) -> str: data = subprocess.check_output( ["nix-prefetch-git", "--fetch-submodules", self.url(""), ref] @@ -197,15 +217,17 @@ def get_current_plugins() -> List[Plugin]: return plugins -def prefetch_plugin(user: str, repo_name: str, alias: str, cache: "Cache") -> Plugin: - repo = Repo(user, repo_name) +def prefetch_plugin( + user: str, repo_name: str, alias: str, cache: "Cache" +) -> Tuple[Plugin, Dict[str, str]]: + repo = Repo(user, repo_name, alias) commit, date = repo.latest_commit() has_submodules = repo.has_submodules() cached_plugin = cache[commit] if cached_plugin is not None: cached_plugin.name = alias or repo_name cached_plugin.date = date - return cached_plugin + return cached_plugin, repo.redirect print(f"prefetch {user}/{repo_name}") if has_submodules: @@ -213,7 +235,10 @@ def prefetch_plugin(user: str, repo_name: str, alias: str, cache: "Cache") -> Pl else: sha256 = repo.prefetch_github(commit) - return Plugin(alias or repo_name, commit, has_submodules, sha256, date=date) + return ( + Plugin(alias or repo_name, commit, has_submodules, sha256, date=date), + repo.redirect, + ) def print_download_error(plugin: str, ex: Exception): @@ -227,20 +252,22 @@ def print_download_error(plugin: str, ex: Exception): def check_results( - results: List[Tuple[str, str, Union[Exception, Plugin]]] -) -> List[Tuple[str, str, Plugin]]: + results: List[Tuple[str, str, Union[Exception, Plugin], Dict[str, str]]] +) -> Tuple[List[Tuple[str, str, Plugin]], Dict[str, str]]: failures: List[Tuple[str, Exception]] = [] plugins = [] - for (owner, name, result) in results: + redirects: Dict[str, str] = {} + for (owner, name, result, redirect) in results: if isinstance(result, Exception): failures.append((name, result)) else: plugins.append((owner, name, result)) + redirects.update(redirect) print(f"{len(results) - len(failures)} plugins were checked", end="") if len(failures) == 0: print() - return plugins + return plugins, redirects else: print(f", {len(failures)} plugin(s) could not be downloaded:\n") @@ -328,15 +355,15 @@ class Cache: def prefetch( args: Tuple[str, str, str], cache: Cache -) -> Tuple[str, str, Union[Exception, Plugin]]: +) -> Tuple[str, str, Union[Exception, Plugin], dict]: assert len(args) == 3 owner, repo, alias = args try: - plugin = prefetch_plugin(owner, repo, alias, cache) + plugin, redirect = prefetch_plugin(owner, repo, alias, cache) cache[plugin.commit] = plugin - return (owner, repo, plugin) + return (owner, repo, plugin, redirect) except Exception as e: - return (owner, repo, e) + return (owner, repo, e, {}) header = ( @@ -386,6 +413,49 @@ in lib.fix' (lib.extends overrides packages) print(f"updated {outfile}") +def rewrite_input(input_file: Path, output_file: Path, redirects: dict): + with open(input_file, "r") as f: + lines = f.readlines() + + if redirects: + lines = [redirects.get(line, line) for line in lines] + + cur_date_iso = datetime.now().strftime("%Y-%m-%d") + with open(DEPRECATED, "r") as f: + deprecations = json.load(f) + for old, new in redirects.items(): + old_name = old.split("/")[1].split(" ")[0].strip("\n") + new_name = new.split("/")[1].split(" ")[0].strip("\n") + if old_name != new_name: + deprecations[old_name] = { + "new": new_name, + "date": cur_date_iso, + } + with open(DEPRECATED, "w") as f: + json.dump(deprecations, f, indent=4, sort_keys=True) + + print( + f"""\ +Redirects have been detected and {input_file} has been updated. Please take the +following steps: + 1. Go ahead and commit just the updated expressions as you intended to do: + git add {output_file} + git commit -m "vimPlugins: Update" + 2. Run this script again so these changes will be reflected in the + generated expressions: + ./update.py + 3. Commit {input_file} along with deprecations and generated expressions: + git add {output_file} {input_file} {DEPRECATED} + git commit -m "vimPlugins: Update redirects" + """ + ) + + lines = sorted(lines, key=str.casefold) + + with open(input_file, "w") as f: + f.writelines(lines) + + def parse_args(): parser = argparse.ArgumentParser( description=( @@ -428,10 +498,12 @@ def main() -> None: finally: cache.store() - plugins = check_results(results) + plugins, redirects = check_results(results) generate_nix(plugins, args.outfile) + rewrite_input(args.input_file, args.outfile, redirects) + if __name__ == "__main__": main() diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 874b2471d5c47..1d84a86f847f1 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -9,10 +9,12 @@ alvan/vim-closetag alx741/vim-hindent alx741/vim-stylishask amiorin/ctrlp-z +andrep/vimacs andreshazard/vim-logreview andsild/peskcolor.vim andviro/flake8-vim andys8/vim-elm-syntax +antoinemadec/coc-fzf ap/vim-css-color arcticicestudio/nord-vim artur-shaik/vim-javacomplete2 @@ -20,8 +22,8 @@ autozimu/LanguageClient-neovim ayu-theme/ayu-vim bazelbuild/vim-bazel bbchung/clighter8 -benmills/vimux benizi/vim-automkdir +benmills/vimux bhurlow/vim-parinfer bitc/vim-hdevtools bkad/camelcasemotion @@ -35,8 +37,6 @@ brooth/far.vim carlitux/deoplete-ternjs ccarpita/rtorrent-syntax-file cespare/vim-toml -chemzqm/denite-extra -chemzqm/denite-git Chiel92/vim-autoformat chikatoike/concealedyank.vim chikatoike/sourcemap.vim @@ -57,22 +57,25 @@ cocopon/iceberg.vim cohama/lexima.vim ctjhoa/spacevim ctrlpvim/ctrlp.vim -dag/vim2hs dag/vim-fish +dag/vim2hs dannyob/quickfixstatus darfink/starsearch.vim dart-lang/dart-vim-plugin david-a-wheeler/vim-metamath davidhalter/jedi-vim dcharbon/vim-flatbuffers +dense-analysis/ale +deoplete-plugins/deoplete-clang deoplete-plugins/deoplete-dictionary +deoplete-plugins/deoplete-go deoplete-plugins/deoplete-jedi deoplete-plugins/deoplete-zsh derekelkins/agda-vim derekwyatt/vim-scala dhruvasagar/vim-prosession dhruvasagar/vim-table-mode -digitaltoad/vim-jade +digitaltoad/vim-pug direnv/direnv.vim dleonard0/pony-vim-syntax dracula/vim @@ -85,7 +88,7 @@ easymotion/vim-easymotion editorconfig/editorconfig-vim ehamberg/vim-cute-python eikenb/acp -elixir-lang/vim-elixir +elixir-editors/vim-elixir elmcast/elm-vim elzr/vim-json embear/vim-localvimrc @@ -108,7 +111,6 @@ garbas/vim-snipmate gentoo/gentoo-syntax gibiansky/vim-textobj-haskell glts/vim-textobj-comment -gmarik/vundle godlygeek/csapprox godlygeek/tabular google/vim-codefmt @@ -117,6 +119,8 @@ google/vim-maktaba gorkunov/smartpairs.vim gotcha/vimelette gregsexton/gitv +gruvbox-community/gruvbox as gruvbox-community +gu-fan/riv.vim guns/vim-clojure-highlight guns/vim-clojure-static guns/vim-sexp @@ -147,7 +151,7 @@ itchyny/vim-cursorword itchyny/vim-gitbranch ivanov/vim-ipython jacoborus/tender.vim -janko-m/vim-test +janko/vim-test jaredgorski/SpaceCamp JazzCore/ctrlp-cmatcher jceb/vim-hier @@ -203,6 +207,7 @@ kchmck/vim-coffee-script KeitaNakamura/neodark.vim keith/swift.vim kien/rainbow_parentheses.vim +knubie/vim-kitty-navigator konfekt/fastfold kristijanhusak/defx-git kristijanhusak/defx-icons @@ -259,7 +264,7 @@ markonm/traces.vim martinda/Jenkinsfile-vim-syntax mattn/calendar-vim as mattn-calendar-vim mattn/emmet-vim -mattn/gist-vim +mattn/vim-gist mattn/webapi-vim matze/vim-move maximbaz/lightline-ale @@ -314,8 +319,8 @@ neoclide/coc-neco neoclide/coc-pairs neoclide/coc-prettier neoclide/coc-python -neoclide/coc-rls neoclide/coc-r-lsp +neoclide/coc-rls neoclide/coc-smartf neoclide/coc-snippets neoclide/coc-solargraph @@ -329,12 +334,14 @@ neoclide/coc-vimtex neoclide/coc-wxml neoclide/coc-yaml neoclide/coc-yank +neoclide/denite-extra +neoclide/denite-git neoclide/vim-easygit neomake/neomake +neovim/nvim-lsp +neovim/nvimdev.nvim neovimhaskell/haskell-vim neovimhaskell/nvim-hs.vim -neovim/nvimdev.nvim -neovim/nvim-lsp neutaaaaan/iosvkem nfnty/vim-nftables nicoe/deoplete-khard @@ -355,7 +362,7 @@ osyo-manga/vim-watchdogs pangloss/vim-javascript parsonsmatt/intero-neovim pearofducks/ansible-vim -peder2tm/sved +peterbjorgensen/sved peterhoeg/vim-qml phanviet/vim-monokai-pro plasticboy/vim-markdown @@ -363,7 +370,10 @@ ponko2/deoplete-fish posva/vim-vue powerman/vim-plugin-AnsiEsc PProvost/vim-ps1 +preservim/nerdcommenter +preservim/nerdtree ptzz/lf.vim +purescript-contrib/purescript-vim python-mode/python-mode qnighy/lalrpop.vim qpkorr/vim-bufkill @@ -372,7 +382,6 @@ racer-rust/vim-racer rafaqz/ranger.vim rafi/awesome-vim-colorschemes raghur/vim-ghost -raichoo/purescript-vim Raimondi/delimitMate rakr/vim-one rbgrouleff/bclose.vim @@ -381,7 +390,6 @@ reedes/vim-wordy rhysd/committia.vim rhysd/vim-grammarous rhysd/vim-operator-surround -Rip-Rip/clang_complete rodjek/vim-puppet romainl/vim-cool ron89/thesaurus_query.vim @@ -391,15 +399,11 @@ roxma/nvim-yarp RRethy/vim-illuminate rust-lang/rust.vim ryanoasis/vim-devicons -Rykka/riv.vim ryvnf/readline.vim sakhnik/nvim-gdb saltstack/salt-vim samoshkin/vim-mergetool sbdchd/neoformat -scrooloose/nerdcommenter -scrooloose/nerdtree -scrooloose/syntastic sebastianmarkow/deoplete-rust SevereOverfl0w/deoplete-github sheerun/vim-polyglot @@ -501,22 +505,20 @@ uarun/vim-protobuf udalov/kotlin-vim ujihisa/neco-look unblevable/quick-scope -valloric/youcompleteme Valodim/deoplete-notmuch vhda/verilog_systemverilog.vim vim-airline/vim-airline vim-airline/vim-airline-themes -vimlab/split-term.vim -vimoutliner/vimoutliner vim-pandoc/vim-pandoc vim-pandoc/vim-pandoc-after vim-pandoc/vim-pandoc-syntax vim-ruby/vim-ruby +vim-scripts/a.vim vim-scripts/align vim-scripts/argtextobj.vim vim-scripts/autoload_cscope.vim -vim-scripts/a.vim vim-scripts/bats.vim +vim-scripts/BufOnly.vim vim-scripts/changeColorScheme.vim vim-scripts/Colour-Sampler-Pack vim-scripts/DoxygenToolkit.vim @@ -537,11 +539,15 @@ vim-scripts/taglist.vim vim-scripts/utl.vim vim-scripts/wombat256.vim vim-scripts/YankRing.vim +vim-syntastic/syntastic vim-utils/vim-husk +vimlab/split-term.vim +vimoutliner/vimoutliner vimwiki/vimwiki vito-c/jq.vim +vmchale/ats-vim vmchale/dhall-vim -w0rp/ale +VundleVim/Vundle.vim wakatime/vim-wakatime wannesm/wmgraphviz.vim wellle/targets.vim @@ -550,11 +556,11 @@ will133/vim-dirdiff wincent/command-t wincent/ferret wsdjeg/vim-fetch +xavierd/clang_complete xolox/vim-easytags xolox/vim-misc xuhdev/vim-latex-live-preview +ycm-core/YouCompleteMe Yggdroot/indentLine zah/nim.vim -zchee/deoplete-clang -zchee/deoplete-go -zig-lang/zig.vim +ziglang/zig.vim diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 81cd77f3edb56..d745198e6a409 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -250,13 +250,14 @@ let # plugins with dependencies plugins = findDependenciesRecursively specifiedPlugins; - # Vim almost reads JSON, so eventually JSON support should be added to Nix - # TODO: proper quoting - toNix = x: - if (builtins.isString x) then "'${x}'" - else if builtins.isAttrs x && builtins ? out then toNix x # a derivation - else if builtins.isAttrs x then "{${lib.concatStringsSep ", " (lib.mapAttrsToList (n: v: "${toNix n}: ${toNix v}") x)}}" - else if builtins.isList x then "[${lib.concatMapStringsSep ", " toNix x}]" + # Convert scalars, lists, and attrs, to VimL equivalents + toVimL = x: + if builtins.isString x then "'${lib.replaceStrings [ "\n" "'" ] [ "\n\\ " "''" ] x}'" + else if builtins.isAttrs x && builtins ? out then toVimL x # a derivation + else if builtins.isAttrs x then "{${lib.concatStringsSep ", " (lib.mapAttrsToList (n: v: "${toVimL n}: ${toVimL v}") x)}}" + else if builtins.isList x then "[${lib.concatMapStringsSep ", " toVimL x}]" + else if builtins.isInt x || builtins.isFloat x then builtins.toString x + else if builtins.isBool x then (if x then "1" else "0") else throw "turning ${lib.generators.toPretty {} x} into a VimL thing not implemented yet"; in assert builtins.hasAttr "vim-addon-manager" knownPlugins; @@ -293,9 +294,9 @@ let endif endif - " tell vam about which plugins to load when: + " tell vam which plugins to load, and when: let l = [] - ${lib.concatMapStrings (p: "call add(l, {'name': '${p.pname}'})\n") plugins} + ${lib.concatMapStrings (p: "call add(l, ${toVimL p})\n") vam.pluginDictionaries} call vam#Scripts(l, {}) ''); |