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
|
let
|
||||||
inherit (builtins) readFile;
|
inherit (builtins) readFile;
|
||||||
|
|
||||||
|
hopLuaConfig = readFile ./hop-nvim.lua;
|
||||||
|
|
||||||
orgmodeSettings = lib.toLua (lib.attrByPath [ "orgmode" "settings" ] { } plugins);
|
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
|
in
|
||||||
{
|
{
|
||||||
luaConfig = readFile ./hop-nvim.lua
|
luaConfig = hopLuaConfig + orgmodeLuaConfig + colorizerLuaConfig;
|
||||||
+ lib.optional enableOrgMode (readFile (lib.substituteAll { src = ./nvim-orgmode.lua; inherit orgmodeSettings; }))
|
|
||||||
+ readFile ./nvim-colorizer.lua;
|
|
||||||
|
|
||||||
plugins = [ hop-nvim nvim-colorizer ]
|
plugins = [ hop-nvim nvim-colorizer ]
|
||||||
++ lib.optional enableOrgMode [ nvim-orgmode org-bullets-nvim ];
|
++ lib.optional enableOrgMode [ nvim-orgmode org-bullets-nvim ];
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
require("coloriazer").setup()
|
require("colorizer").setup(@colorizerFiletypes@, @colorizerSettings@)
|
||||||
|
|
Reference in a new issue