treewide: Reformat with nixfmt

This commit is contained in:
traxys 2024-05-05 19:39:35 +02:00
parent c6281260dc
commit 62f32bfc71
459 changed files with 28139 additions and 26377 deletions

View file

@ -4,11 +4,12 @@
config,
...
}:
with lib; {
with lib;
{
options = {
highlight = mkOption {
type = types.attrsOf helpers.nixvimTypes.highlight;
default = {};
default = { };
description = "Define new highlight groups";
example = ''
highlight = {
@ -19,7 +20,7 @@ with lib; {
highlightOverride = mkOption {
type = types.attrsOf helpers.nixvimTypes.highlight;
default = {};
default = { };
description = "Define highlight groups to override existing highlight";
example = ''
highlight = {
@ -30,7 +31,7 @@ with lib; {
match = mkOption {
type = types.attrsOf types.str;
default = {};
default = { };
description = "Define match groups";
example = ''
match = {
@ -42,10 +43,8 @@ with lib; {
config = {
extraConfigLuaPre =
(optionalString (config.highlight != {})
/*
lua
*/
(optionalString (config.highlight != { })
# lua
''
-- Highlight groups {{
do
@ -56,11 +55,10 @@ with lib; {
end
end
-- }}
'')
+ (optionalString (config.match != {})
/*
lua
*/
''
)
+ (optionalString (config.match != { })
# lua
''
-- Match groups {{
do
@ -71,23 +69,22 @@ with lib; {
end
end
-- }}
'');
''
);
extraConfigLuaPost =
optionalString (config.highlightOverride != {})
/*
lua
*/
''
-- Highlight groups {{
do
local highlights = ${helpers.toLuaObject config.highlightOverride}
optionalString (config.highlightOverride != { })
# lua
''
-- Highlight groups {{
do
local highlights = ${helpers.toLuaObject config.highlightOverride}
for k,v in pairs(highlights) do
vim.api.nvim_set_hl(0, k, v)
for k,v in pairs(highlights) do
vim.api.nvim_set_hl(0, k, v)
end
end
end
-- }}
'';
-- }}
'';
};
}