modules/diagnostics: rename source file

This commit is contained in:
Gaetan Lepage 2024-06-21 15:38:56 +02:00 committed by Gaétan Lepage
parent 4766d05fb1
commit e84881f46f
2 changed files with 1 additions and 1 deletions

26
modules/diagnostics.nix Normal file
View file

@ -0,0 +1,26 @@
{
lib,
helpers,
config,
...
}:
with lib;
{
options = {
diagnostics = mkOption {
type = with types; attrsOf anything;
default = { };
description = "The configuration diagnostic options, provided to `vim.diagnostic.config`.";
example = {
virtual_text = false;
virtual_lines.only_current_line = true;
};
};
};
config = {
extraConfigLuaPre = optionalString (config.diagnostics != { }) ''
vim.diagnostic.config(${helpers.toLuaObject config.diagnostics})
'';
};
}