mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +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;
|
type = types.attrsOf helpers.autocmd.autoGroupOption;
|
||||||
default = { };
|
default = { };
|
||||||
description = "augroup definitions";
|
description = "augroup definitions";
|
||||||
example = ''
|
example = {
|
||||||
autoGroups = {
|
my_augroup = {
|
||||||
my_augroup = {
|
clear = true;
|
||||||
clear = true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
'';
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
autoCmd = mkOption {
|
autoCmd = mkOption {
|
||||||
type = types.listOf helpers.autocmd.autoCmdOption;
|
type = types.listOf helpers.autocmd.autoCmdOption;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = "autocmd definitions";
|
description = "autocmd definitions";
|
||||||
example = ''
|
example = [
|
||||||
autoCmd = [
|
{
|
||||||
{
|
event = [
|
||||||
event = [ "BufEnter" "BufWinEnter" ];
|
"BufEnter"
|
||||||
pattern = [ "*.c" "*.h" ];
|
"BufWinEnter"
|
||||||
command = "echo 'Entering a C or C++ file'";
|
];
|
||||||
}
|
pattern = [
|
||||||
];
|
"*.c"
|
||||||
'';
|
"*.h"
|
||||||
|
];
|
||||||
|
command = "echo 'Entering a C or C++ file'";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,33 +11,27 @@ with lib;
|
||||||
type = types.attrsOf helpers.nixvimTypes.highlight;
|
type = types.attrsOf helpers.nixvimTypes.highlight;
|
||||||
default = { };
|
default = { };
|
||||||
description = "Define new highlight groups";
|
description = "Define new highlight groups";
|
||||||
example = ''
|
example = {
|
||||||
highlight = {
|
MacchiatoRed.fg = "#ed8796";
|
||||||
MacchiatoRed.fg = "#ed8796";
|
};
|
||||||
};
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
highlightOverride = mkOption {
|
highlightOverride = mkOption {
|
||||||
type = types.attrsOf helpers.nixvimTypes.highlight;
|
type = types.attrsOf helpers.nixvimTypes.highlight;
|
||||||
default = { };
|
default = { };
|
||||||
description = "Define highlight groups to override existing highlight";
|
description = "Define highlight groups to override existing highlight";
|
||||||
example = ''
|
example = {
|
||||||
highlightOverride = {
|
Comment.fg = "#ff0000";
|
||||||
Comment.fg = "#ff0000";
|
};
|
||||||
};
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
match = mkOption {
|
match = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = { };
|
default = { };
|
||||||
description = "Define match groups";
|
description = "Define match groups";
|
||||||
example = ''
|
example = {
|
||||||
match = {
|
ExtraWhitespace = "\\s\\+$";
|
||||||
ExtraWhitespace = "\\s\\+$";
|
};
|
||||||
};
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue