mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-22 08:39:49 +01:00
implement extraPluginConfigs
This commit is contained in:
parent
2319ee082c
commit
2167481cc2
1 changed files with 22 additions and 0 deletions
|
@ -302,6 +302,7 @@ in {
|
||||||
result;
|
result;
|
||||||
in {
|
in {
|
||||||
vim = {
|
vim = {
|
||||||
|
startPlugins = concatMap (x: x.package) (attrValues cfg.extraPlugins);
|
||||||
configRC = {
|
configRC = {
|
||||||
globalsScript = nvim.dag.entryAnywhere (concatStringsSep "\n" globalsScript);
|
globalsScript = nvim.dag.entryAnywhere (concatStringsSep "\n" globalsScript);
|
||||||
|
|
||||||
|
@ -319,6 +320,27 @@ in {
|
||||||
in
|
in
|
||||||
nvim.dag.entryAfter ["globalsScript"] luaConfig;
|
nvim.dag.entryAfter ["globalsScript"] luaConfig;
|
||||||
|
|
||||||
|
extraPluginConfigs = let
|
||||||
|
mkSection = r: ''
|
||||||
|
-- SECTION: ${r.name}
|
||||||
|
${r.data}
|
||||||
|
'';
|
||||||
|
mapResult = r: (wrapLuaConfig (concatStringsSep "\n" (map mkSection r)));
|
||||||
|
extraPluginsDag = mapAttrs (_: {
|
||||||
|
dependencies,
|
||||||
|
setup,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
nvim.dag.entryAfter dependencies setup)
|
||||||
|
cfg.extraPlugins;
|
||||||
|
pluginConfig = resolveDag {
|
||||||
|
name = "extra plugins config";
|
||||||
|
dag = extraPluginsDag;
|
||||||
|
inherit mapResult;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
nvim.dag.entryAfter ["luaScript"] pluginConfig;
|
||||||
|
|
||||||
# This is probably not the right way to set the config. I'm not sure how it should look like.
|
# This is probably not the right way to set the config. I'm not sure how it should look like.
|
||||||
mappings = let
|
mappings = let
|
||||||
maps = [
|
maps = [
|
||||||
|
|
Loading…
Reference in a new issue