mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules: use real nix expressions for option examples
This commit is contained in:
parent
16db91b37a
commit
affee53852
2 changed files with 26 additions and 30 deletions
|
@ -11,28 +11,30 @@ with lib;
|
|||
type = types.attrsOf helpers.autocmd.autoGroupOption;
|
||||
default = { };
|
||||
description = "augroup definitions";
|
||||
example = ''
|
||||
autoGroups = {
|
||||
example = {
|
||||
my_augroup = {
|
||||
clear = true;
|
||||
}
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
autoCmd = mkOption {
|
||||
type = types.listOf helpers.autocmd.autoCmdOption;
|
||||
default = [ ];
|
||||
description = "autocmd definitions";
|
||||
example = ''
|
||||
autoCmd = [
|
||||
example = [
|
||||
{
|
||||
event = [ "BufEnter" "BufWinEnter" ];
|
||||
pattern = [ "*.c" "*.h" ];
|
||||
event = [
|
||||
"BufEnter"
|
||||
"BufWinEnter"
|
||||
];
|
||||
pattern = [
|
||||
"*.c"
|
||||
"*.h"
|
||||
];
|
||||
command = "echo 'Entering a C or C++ file'";
|
||||
}
|
||||
];
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -11,33 +11,27 @@ with lib;
|
|||
type = types.attrsOf helpers.nixvimTypes.highlight;
|
||||
default = { };
|
||||
description = "Define new highlight groups";
|
||||
example = ''
|
||||
highlight = {
|
||||
example = {
|
||||
MacchiatoRed.fg = "#ed8796";
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
highlightOverride = mkOption {
|
||||
type = types.attrsOf helpers.nixvimTypes.highlight;
|
||||
default = { };
|
||||
description = "Define highlight groups to override existing highlight";
|
||||
example = ''
|
||||
highlightOverride = {
|
||||
example = {
|
||||
Comment.fg = "#ff0000";
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
match = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Define match groups";
|
||||
example = ''
|
||||
match = {
|
||||
example = {
|
||||
ExtraWhitespace = "\\s\\+$";
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue