馃 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 64 lines 1.2 kB view raw
1{ 2 lib, 3 newScope, 4 vimUtils, 5}: 6let 7 inherit (lib) makeScope; 8 inherit (builtins) 9 mapAttrs 10 ; 11 12 npins = import ./npins { }; 13 sources = mapAttrs ( 14 n: v: 15 let 16 src = v { }; 17 in 18 { 19 inherit src; 20 passthru.as = n; 21 } 22 ) npins; 23 24 mkPlugin = 25 name: args: 26 let 27 oa = sources.${name}; 28 29 passthru = args.passthru or { } // { 30 as = args.passthru.as or oa.passthru.as; 31 start = if (args ? passthru && args.passthru ? start) then args.passthru.start else false; 32 }; 33 in 34 vimUtils.buildVimPlugin ( 35 oa 36 // args 37 // { 38 pname = args.pname or passthru.as; 39 version = "0-dev${oa.src.revision}"; 40 41 doCheck = false; 42 43 inherit passthru; 44 } 45 ); 46 47 generatedPlugins = mapAttrs (n: _: mkPlugin n { }) sources; 48 49 madePlugins = 50 let 51 start = { 52 passthru.start = true; 53 }; 54 in 55 { 56 lynn = mkPlugin "lynn" start; 57 lspconfig = mkPlugin "lspconfig" start; 58 plenary = mkPlugin "plenary" start; 59 friendly-snippets = mkPlugin "friendly-snippets" start; 60 }; 61 62 plugins = generatedPlugins // madePlugins; 63in 64makeScope newScope (_: plugins)