2022-09-19 18:44:57 +03:00
|
|
|
{ enableDevIcons ? false
|
|
|
|
, enableBarBar ? false
|
|
|
|
, enableTabby ? false
|
2022-10-22 23:35:27 +03:00
|
|
|
, enableOrgMode ? false
|
2022-09-20 09:20:55 +03:00
|
|
|
, viAlias ? false
|
|
|
|
, vimAlias ? false
|
2022-10-19 11:53:12 +03:00
|
|
|
, grammarFileTypes ? [ "nix" ]
|
2022-09-24 17:21:16 +03:00
|
|
|
, theme ? { }
|
2022-09-18 12:15:44 +03:00
|
|
|
, wrapNeovim
|
|
|
|
, neovim-unwrapped
|
2022-09-24 17:21:16 +03:00
|
|
|
, tree-sitter
|
2022-09-18 12:15:44 +03:00
|
|
|
, vimPlugins
|
2022-10-22 23:35:27 +03:00
|
|
|
, lib
|
2022-09-18 12:15:44 +03:00
|
|
|
, ...
|
|
|
|
}:
|
2022-09-15 01:29:25 +03:00
|
|
|
|
2022-09-15 09:57:11 +03:00
|
|
|
let
|
2022-10-22 23:35:27 +03:00
|
|
|
inherit (builtins) catAttrs isFunction readFile;
|
|
|
|
myLib = import ./lib.nix { inherit lib; };
|
2022-09-15 09:57:11 +03:00
|
|
|
|
2022-10-22 23:35:27 +03:00
|
|
|
pluginParams = vimPlugins // {
|
|
|
|
inherit tree-sitter grammarFileTypes;
|
|
|
|
inherit enableDevIcons enableTabby enableOrgMode;
|
|
|
|
themeCfg = theme;
|
|
|
|
lib = myLib;
|
|
|
|
};
|
2022-09-17 15:59:06 +03:00
|
|
|
|
2022-10-22 23:35:27 +03:00
|
|
|
callPlugin = op:
|
|
|
|
if isFunction op then op pluginParams else import op pluginParams;
|
|
|
|
callPlugins = list: map callPlugin list;
|
2022-09-16 01:50:38 +03:00
|
|
|
|
|
|
|
plugins = callPlugins [
|
2022-09-19 19:03:40 +03:00
|
|
|
./plugins/config
|
2022-10-22 23:35:27 +03:00
|
|
|
./plugins/syntax
|
2022-09-18 16:32:54 +03:00
|
|
|
./plugins/git
|
2022-09-16 10:10:38 +03:00
|
|
|
./plugins/explorer
|
2022-10-22 23:35:27 +03:00
|
|
|
./plugins/theme
|
2022-09-16 10:10:38 +03:00
|
|
|
./plugins/lsp
|
2022-09-16 10:18:16 +03:00
|
|
|
./plugins/formatter
|
2022-09-18 16:10:03 +03:00
|
|
|
./plugins/ux
|
2022-09-15 09:57:11 +03:00
|
|
|
];
|
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
basePlugins = [ vimPlugins.plenary-nvim ];
|
2022-10-22 23:35:27 +03:00
|
|
|
customPlugins = catAttrs "plugins" plugins;
|
2022-09-24 17:21:16 +03:00
|
|
|
allPlugins = basePlugins ++ customPlugins;
|
|
|
|
|
2022-10-22 23:35:27 +03:00
|
|
|
basicConfigs = map readFile [ ./config/basic.lua ];
|
|
|
|
pluginConfigs = catAttrs "luaConfig" plugins;
|
2022-09-16 10:10:38 +03:00
|
|
|
allConfigs = basicConfigs ++ pluginConfigs;
|
2022-09-15 09:57:11 +03:00
|
|
|
in
|
2022-09-15 01:29:25 +03:00
|
|
|
wrapNeovim neovim-unwrapped {
|
2022-09-20 09:20:55 +03:00
|
|
|
inherit viAlias;
|
|
|
|
inherit vimAlias;
|
|
|
|
|
2022-09-15 01:29:25 +03:00
|
|
|
withPython3 = false;
|
|
|
|
withNodeJs = false;
|
|
|
|
withRuby = false;
|
|
|
|
|
|
|
|
configure = {
|
2022-10-22 23:35:27 +03:00
|
|
|
customRC = myLib.mkLuaRc allConfigs;
|
2022-09-15 01:29:25 +03:00
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
packages.myVimPackages = { start = allPlugins; };
|
2022-09-15 01:29:25 +03:00
|
|
|
};
|
|
|
|
}
|