add options to configure extra plugins

This commit is contained in:
Dmitriy Pleshevskiy 2022-11-30 22:52:01 +03:00
parent 437e0e05cf
commit 99e095d919
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -5,6 +5,8 @@
, viAlias ? false , viAlias ? false
, vimAlias ? false , vimAlias ? false
, grammarFileTypes ? [ "nix" ] , grammarFileTypes ? [ "nix" ]
, extraConfig ? ""
, extraPlugins ? [ ]
, theme ? { } , theme ? { }
, plugins ? { } , plugins ? { }
, wrapNeovim , wrapNeovim
@ -49,11 +51,11 @@ let
basePlugins = [ neovimPlugins.plenary-nvim ]; basePlugins = [ neovimPlugins.plenary-nvim ];
customPlugins = catAttrs "plugins" pluginsSettings; customPlugins = catAttrs "plugins" pluginsSettings;
allPlugins = basePlugins ++ customPlugins; allPlugins = basePlugins ++ customPlugins ++ extraPlugins;
basicConfigs = map readFile [ ./config/basic.lua ]; basicConfigs = map readFile [ ./config/basic.lua ];
pluginConfigs = catAttrs "luaConfig" pluginsSettings; pluginConfigs = catAttrs "luaConfig" pluginsSettings;
allConfigs = basicConfigs ++ pluginConfigs; allConfigs = basicConfigs ++ pluginConfigs ++ [ extraConfig ];
in in
(wrapNeovim neovim-unwrapped { (wrapNeovim neovim-unwrapped {
inherit viAlias; inherit viAlias;