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

31 lines
693 B
Nix
Raw Normal View History

2022-09-16 23:42:53 +03:00
{ wrapNeovim, neovim-unwrapped, vimPlugins, ... }:
2022-09-15 01:29:25 +03:00
2022-09-15 09:57:11 +03:00
let
lib = import ./lib.nix;
2022-09-16 23:42:53 +03:00
callPlugins = list: builtins.map (p: import p vimPlugins) list;
plugins = callPlugins [
2022-09-16 10:10:38 +03:00
./plugins/syntax
./plugins/explorer
./plugins/theme
./plugins/lsp
2022-09-16 10:18:16 +03:00
./plugins/formatter
2022-09-15 09:57:11 +03:00
];
2022-09-16 10:18:16 +03:00
basicConfigs = map builtins.readFile [ ./config/basic.lua ];
2022-09-16 10:10:38 +03:00
pluginConfigs = lib.extractAttrs "luaConfig" plugins;
allConfigs = basicConfigs ++ pluginConfigs;
2022-09-15 09:57:11 +03:00
in
2022-09-15 01:29:25 +03:00
wrapNeovim neovim-unwrapped {
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-16 10:10:38 +03:00
packages.myVimPackages = { start = lib.extractAttrs "plugins" plugins; };
2022-09-15 01:29:25 +03:00
};
}