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

29 lines
908 B
Nix
Raw Normal View History

2022-10-22 23:35:27 +03:00
{ lib
2022-11-19 00:56:53 +03:00
, plugins
2022-10-22 23:35:27 +03:00
, hop-nvim
, nvim-orgmode
2023-05-22 13:42:35 +03:00
, nvim-colorizer
2022-10-22 23:35:27 +03:00
, org-bullets-nvim
, enableOrgMode ? false
, ...
}:
2022-10-22 23:35:27 +03:00
let
inherit (builtins) readFile;
2022-11-19 00:56:53 +03:00
hopLuaConfig = readFile ./hop-nvim.lua;
2022-11-19 00:56:53 +03:00
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" ] { } plugins);
colorizerSettings = lib.toLua (lib.attrByPath [ "colorizer" "settings" ] { } plugins);
colorizerLuaConfig = readFile (lib.substituteAll { src = ./nvim-colorizer.lua; inherit colorizerFiletypes colorizerSettings; });
2022-10-22 23:35:27 +03:00
in
{
luaConfig = hopLuaConfig + orgmodeLuaConfig + colorizerLuaConfig;
2023-05-22 13:42:35 +03:00
plugins = [ hop-nvim nvim-colorizer ]
2022-10-22 23:35:27 +03:00
++ lib.optional enableOrgMode [ nvim-orgmode org-bullets-nvim ];
}