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/plugins/ux/default.nix

28 lines
926 B
Nix

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