modules: use real nix expressions for option examples

This commit is contained in:
Gaetan Lepage 2024-06-19 16:20:13 +02:00 committed by Gaétan Lepage
parent 16db91b37a
commit affee53852
2 changed files with 26 additions and 30 deletions

View file

@ -11,28 +11,30 @@ with lib;
type = types.attrsOf helpers.autocmd.autoGroupOption;
default = { };
description = "augroup definitions";
example = ''
autoGroups = {
my_augroup = {
clear = true;
}
example = {
my_augroup = {
clear = true;
};
'';
};
};
autoCmd = mkOption {
type = types.listOf helpers.autocmd.autoCmdOption;
default = [ ];
description = "autocmd definitions";
example = ''
autoCmd = [
{
event = [ "BufEnter" "BufWinEnter" ];
pattern = [ "*.c" "*.h" ];
command = "echo 'Entering a C or C++ file'";
}
];
'';
example = [
{
event = [
"BufEnter"
"BufWinEnter"
];
pattern = [
"*.c"
"*.h"
];
command = "echo 'Entering a C or C++ file'";
}
];
};
};