{ enableDevIcons ? false
, enableBarBar ? false
, enableTabby ? false
, viAlias ? false
, vimAlias ? false
, theme ? { }
, wrapNeovim
, neovim-unwrapped
, tree-sitter
, 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/lsp
];
basePlugins = [ vimPlugins.plenary-nvim ];
customPlugins = builtins.catAttrs "plugins" plugins;
allPlugins = basePlugins ++ customPlugins;
basicConfigs = builtins.map builtins.readFile [ ./config/basic.lua ];
pluginConfigs = builtins.catAttrs "luaConfig" plugins;
allConfigs = basicConfigs ++ pluginConfigs;
in
wrapNeovim neovim-unwrapped {
inherit viAlias;
inherit vimAlias;
withPython3 = false;
withNodeJs = false;
withRuby = false;
configure = {
customRC = lib.mkLuaRc allConfigs;
packages.myVimPackages = { start = allPlugins; };
};
}