mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-01 12:54:30 +02:00
tokyonight: Add onColor and onHightlights (#309)
Co-authored-by: Carl Dong <git@carldong.me>
This commit is contained in:
parent
75f7b22f21
commit
d62edf4178
2 changed files with 23 additions and 4 deletions
|
@ -50,6 +50,21 @@ in {
|
||||||
lualineBold =
|
lualineBold =
|
||||||
helpers.defaultNullOpts.mkBool false
|
helpers.defaultNullOpts.mkBool false
|
||||||
"When true, section headers in the lualine theme will be bold";
|
"When true, section headers in the lualine theme will be bold";
|
||||||
|
onColors =
|
||||||
|
helpers.defaultNullOpts.mkStr "function(colors) end"
|
||||||
|
''
|
||||||
|
Override specific color groups to use other groups or a hex color.
|
||||||
|
function will be called with a ColorScheme table.
|
||||||
|
`@param colors ColorScheme`
|
||||||
|
'';
|
||||||
|
onHighlights =
|
||||||
|
helpers.defaultNullOpts.mkStr "function(highlights, colors) end"
|
||||||
|
''
|
||||||
|
Override specific highlights to use other groups or a hex color.
|
||||||
|
function will be called with a Highlights and ColorScheme table
|
||||||
|
`@param highlights Highlights`
|
||||||
|
`@param colors ColorScheme`
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -64,6 +79,12 @@ in {
|
||||||
dim_inactive = dimInactive;
|
dim_inactive = dimInactive;
|
||||||
lualine_bold = lualineBold;
|
lualine_bold = lualineBold;
|
||||||
day_brightness = dayBrightness;
|
day_brightness = dayBrightness;
|
||||||
|
on_colors =
|
||||||
|
helpers.ifNonNull' cfg.onColors
|
||||||
|
(helpers.mkRaw onColors);
|
||||||
|
on_highlights =
|
||||||
|
helpers.ifNonNull' cfg.onHighlights
|
||||||
|
(helpers.mkRaw onHighlights);
|
||||||
};
|
};
|
||||||
in ''
|
in ''
|
||||||
require("tokyonight").setup(${helpers.toLuaObject setupOptions})
|
require("tokyonight").setup(${helpers.toLuaObject setupOptions})
|
||||||
|
|
|
@ -27,10 +27,8 @@
|
||||||
hideInactiveStatusline = false;
|
hideInactiveStatusline = false;
|
||||||
dimInactive = false;
|
dimInactive = false;
|
||||||
lualineBold = false;
|
lualineBold = false;
|
||||||
# Not implemented
|
onColors = "function(colors) end";
|
||||||
# onColors = {__raw = "function(colors) end";};
|
onHighlights = "function(highlights, colors) end";
|
||||||
# Not implemented
|
|
||||||
# onHighlights = {__raw = "function(colors) end";};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue