robin/weave
simple neovim wrapper for nix
git clone https://git.robinwobin.dev/robin/weave
bf40ced
main
1{ 2lib , 3newScope , 4vimUtils , 5 6pins , 7pluginOverrides ? { }, 8} : 9let 10inherit ( lib ) makeScope ; 11inherit ( builtins ) 12mapAttrs 13; 14 15sources = mapAttrs ( 16n: v: 17let 18src = v { }; 19in 20{ 21inherit src ; 22passthru . as = n ; 23} 24) pins ; 25 26mkPlugin = 27name: args: 28let 29oa = sources .${ name } or { }; 30pkg = oa // args ; 31 32passthru = { 33as = name ; 34start = false ; 35} 36// pkg . passthru ; 37in 38vimUtils . buildVimPlugin ( 39pkg 40// { 41pname = pkg . pname or passthru . as ; 42version = "0-dev ${ pkg . src . revision } " ; 43 44doCheck = false ; 45 46inherit passthru ; 47} 48); 49 50generatedPlugins = mapAttrs ( n: _: mkPlugin n { }) sources ; 51 52plugins' = mapAttrs ( n: v: mkPlugin n v ) pluginOverrides ; 53 54plugins = generatedPlugins // plugins' ; 55in 56makeScope newScope ( _: plugins )