2024-10-10 02:42:51 +03:00
|
|
|
{ config, lib, ... }: let
|
|
|
|
color = config.style.color;
|
2024-10-09 04:39:07 +03:00
|
|
|
|
2024-10-10 02:42:51 +03:00
|
|
|
mkHighlight = name: value: ''vim.api.nvim_set_hl(0, "${name}", ${lib.generators.toLua { multiline = false; asBindings = false; } value})'';
|
|
|
|
|
|
|
|
selection = { bg = "#${color.bg.regular}"; };
|
|
|
|
transparent = { bg = lib.generators.mkLuaInline "clear"; };
|
2024-10-09 04:39:07 +03:00
|
|
|
in {
|
|
|
|
text = ''
|
|
|
|
vim.api.nvim_create_autocmd({"ColorScheme", "VimEnter"}, {
|
2024-10-10 02:42:51 +03:00
|
|
|
group = vim.api.nvim_create_augroup('Color', {}),
|
|
|
|
pattern = "*",
|
|
|
|
callback = function ()
|
|
|
|
-- Selection.
|
|
|
|
${mkHighlight "CursorLine" selection}
|
|
|
|
${mkHighlight "Visual" selection}
|
|
|
|
${mkHighlight "TelescopeSelection" selection}
|
|
|
|
|
|
|
|
-- Transparent.
|
|
|
|
${mkHighlight "NormalFloat" transparent}
|
|
|
|
end
|
|
|
|
})
|
2024-10-09 04:39:07 +03:00
|
|
|
'';
|
|
|
|
}
|