{ lib
, plugins
, hop-nvim
, nvim-orgmode
, org-bullets-nvim
, enableOrgMode ? false
, ...
}:
let
inherit (builtins) readFile;
orgmodeSettings = lib.toLua (lib.attrByPath [ "orgmode" "settings" ] { } plugins);
in
{
luaConfig = readFile ./hop-nvim.lua
+ lib.optional enableOrgMode (readFile (lib.substituteAll { src = ./nvim-orgmode.lua; inherit orgmodeSettings; }));
plugins = [ hop-nvim ]
++ lib.optional enableOrgMode [ nvim-orgmode org-bullets-nvim ];
}