mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
plugins: Introduce helpers.defaultNullOpts.mkLuaFn (#855)
This allows to avoid calling `mkRaw` on lua functions, as they will get applied automatically. This could also help in the future to refactor the use of Lua code to make it more user-friendly.
This commit is contained in:
parent
b38dbdb0dc
commit
1d8e7906c9
30 changed files with 140 additions and 119 deletions
|
|
@ -51,14 +51,14 @@ in {
|
|||
helpers.defaultNullOpts.mkBool false
|
||||
"When true, section headers in the lualine theme will be bold";
|
||||
onColors =
|
||||
helpers.defaultNullOpts.mkStr "function(colors) end"
|
||||
helpers.defaultNullOpts.mkLuaFn "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"
|
||||
helpers.defaultNullOpts.mkLuaFn "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
|
||||
|
|
@ -79,8 +79,8 @@ in {
|
|||
dim_inactive = dimInactive;
|
||||
lualine_bold = lualineBold;
|
||||
day_brightness = dayBrightness;
|
||||
on_colors = helpers.mkRaw onColors;
|
||||
on_highlights = helpers.mkRaw onHighlights;
|
||||
on_colors = onColors;
|
||||
on_highlights = onHighlights;
|
||||
};
|
||||
in ''
|
||||
require("tokyonight").setup(${helpers.toLuaObject setupOptions})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue