2024-10-11 23:27:07 +03:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
color = config.style.color;
|
2024-10-09 04:39:07 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
mkHighlight =
|
|
|
|
name: value:
|
|
|
|
''vim.api.nvim_set_hl(0, "${name}", ${
|
|
|
|
lib.generators.toLua {
|
|
|
|
multiline = false;
|
|
|
|
asBindings = false;
|
|
|
|
} value
|
|
|
|
})'';
|
2024-10-10 02:42:51 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
bg = {
|
|
|
|
bg = "#${color.bg.regular}";
|
|
|
|
};
|
|
|
|
selection = {
|
|
|
|
bg = "#${color.selection}";
|
|
|
|
fg = "#${color.fg.dark}";
|
|
|
|
bold = true;
|
|
|
|
};
|
|
|
|
transparent = {
|
|
|
|
bg = lib.generators.mkLuaInline "clear";
|
|
|
|
};
|
2024-10-23 21:19:48 +03:00
|
|
|
border = {
|
|
|
|
bg = lib.generators.mkLuaInline "clear";
|
|
|
|
fg = "#${color.accent}";
|
|
|
|
};
|
2024-10-11 23:27:07 +03:00
|
|
|
in
|
|
|
|
{
|
|
|
|
text = ''
|
|
|
|
vim.api.nvim_create_autocmd({"ColorScheme", "VimEnter"}, {
|
|
|
|
group = vim.api.nvim_create_augroup('Color', {}),
|
|
|
|
pattern = "*",
|
|
|
|
callback = function ()
|
2024-10-23 21:19:48 +03:00
|
|
|
-- Background.
|
2024-10-11 23:27:07 +03:00
|
|
|
${mkHighlight "CursorLine" bg}
|
2024-10-23 21:19:48 +03:00
|
|
|
${mkHighlight "Pmenu" bg}
|
|
|
|
${mkHighlight "PmenuExtra" bg}
|
2024-10-10 03:17:40 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
-- Selection.
|
|
|
|
${mkHighlight "Visual" selection}
|
2024-10-23 21:19:48 +03:00
|
|
|
${mkHighlight "PmenuSel" selection}
|
|
|
|
${mkHighlight "TelescopeSelection" selection}
|
2024-10-10 02:42:51 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
-- Transparent.
|
|
|
|
${mkHighlight "NormalFloat" transparent}
|
2024-10-23 21:19:48 +03:00
|
|
|
|
|
|
|
-- Border.
|
|
|
|
${mkHighlight "FloatBorder" border}
|
|
|
|
${mkHighlight "FloatTitle" border}
|
|
|
|
${mkHighlight "TelescopeBorder" border}
|
2024-10-11 23:27:07 +03:00
|
|
|
end
|
|
|
|
})
|
|
|
|
'';
|
2024-10-09 04:39:07 +03:00
|
|
|
}
|