60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{ enableDevIcons ? false
|
|
, enableBarBar ? false
|
|
, enableTabby ? false
|
|
, viAlias ? false
|
|
, vimAlias ? false
|
|
, grammarFileTypes ? [ "nix" ]
|
|
, 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/config
|
|
(import ./plugins/syntax {
|
|
inherit tree-sitter grammarFileTypes;
|
|
})
|
|
./plugins/git
|
|
./plugins/explorer
|
|
(import ./plugins/theme {
|
|
inherit enableDevIcons enableTabby;
|
|
inherit theme;
|
|
})
|
|
./plugins/lsp
|
|
./plugins/formatter
|
|
./plugins/ux
|
|
];
|
|
|
|
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; };
|
|
};
|
|
}
|