mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 09:04:54 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -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
|
||||
-- }}
|
||||
'';
|
||||
-- }}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue