ux: configure colorize plugin via props
This commit is contained in:
parent
dc2181a344
commit
ecd458f1d3
2 changed files with 9 additions and 4 deletions
|
@ -11,12 +11,17 @@
|
|||
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" ] { } plugins);
|
||||
colorizerSettings = lib.toLua (lib.attrByPath [ "colorizer" "settings" ] { } plugins);
|
||||
colorizerLuaConfig = readFile (lib.substituteAll { src = ./nvim-colorizer.lua; inherit colorizerFiletypes colorizerSettings; });
|
||||
in
|
||||
{
|
||||
luaConfig = readFile ./hop-nvim.lua
|
||||
+ lib.optional enableOrgMode (readFile (lib.substituteAll { src = ./nvim-orgmode.lua; inherit orgmodeSettings; }))
|
||||
+ readFile ./nvim-colorizer.lua;
|
||||
luaConfig = hopLuaConfig + orgmodeLuaConfig + colorizerLuaConfig;
|
||||
|
||||
plugins = [ hop-nvim nvim-colorizer ]
|
||||
++ lib.optional enableOrgMode [ nvim-orgmode org-bullets-nvim ];
|
||||
|
|
|
@ -1 +1 @@
|
|||
require("coloriazer").setup()
|
||||
require("colorizer").setup(@colorizerFiletypes@, @colorizerSettings@)
|
||||
|
|
Reference in a new issue