44 lines
1,015 B
Nix
44 lines
1,015 B
Nix
{ enableDevIcons ? false
|
|
, enableBarBar ? false
|
|
, enableTabby ? false
|
|
, wrapNeovim
|
|
, neovim-unwrapped
|
|
, vimPlugins
|
|
, ...
|
|
}:
|
|
|
|
let
|
|
lib = import ./lib.nix;
|
|
|
|
pluginParams = vimPlugins // { inherit lib; };
|
|
|
|
callPlugin = op: if builtins.isFunction op then op pluginParams else import op pluginParams;
|
|
callPlugins = list: builtins.map callPlugin list;
|
|
|
|
plugins = callPlugins [
|
|
./plugins/syntax
|
|
./plugins/git
|
|
./plugins/explorer
|
|
(import ./plugins/theme {
|
|
inherit enableDevIcons enableBarBar enableTabby;
|
|
})
|
|
./plugins/lsp
|
|
./plugins/formatter
|
|
./plugins/ux
|
|
];
|
|
|
|
basicConfigs = builtins.map builtins.readFile [ ./config/basic.lua ];
|
|
pluginConfigs = builtins.catAttrs "luaConfig" plugins;
|
|
allConfigs = basicConfigs ++ pluginConfigs;
|
|
in
|
|
wrapNeovim neovim-unwrapped {
|
|
withPython3 = false;
|
|
withNodeJs = false;
|
|
withRuby = false;
|
|
|
|
configure = {
|
|
customRC = lib.mkLuaRc allConfigs;
|
|
|
|
packages.myVimPackages = { start = builtins.catAttrs "plugins" plugins; };
|
|
};
|
|
}
|