This repository has been archived on 2024-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/default.nix

43 lines
981 B
Nix

{ enableBarBar ? false
, enableDevIcons ? 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 enableBarBar enableDevIcons;
})
./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; };
};
}