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

48 lines
1 KiB
Nix
Raw Normal View History

2022-09-19 18:44:57 +03:00
{ enableDevIcons ? false
, enableBarBar ? false
, enableTabby ? false
, viAlias ? false
, vimAlias ? false
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-09-15 01:29:25 +03:00
2022-09-15 09:57:11 +03:00
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 [
2022-09-16 10:10:38 +03:00
./plugins/lsp
2022-09-15 09:57:11 +03:00
];
2022-09-24 17:21:16 +03:00
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;
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 {
inherit viAlias;
inherit vimAlias;
2022-09-15 01:29:25 +03:00
withPython3 = false;
withNodeJs = false;
withRuby = false;
configure = {
2022-09-16 10:10:38 +03:00
customRC = lib.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
};
}