nix-community.nixvim/modules/diagnostics.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
533 B
Nix
Raw Normal View History

2024-06-21 12:55:10 +01:00
{
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 = mkIf (config.diagnostics != { }) ''
2024-06-21 12:55:10 +01:00
vim.diagnostic.config(${helpers.toLuaObject config.diagnostics})
'';
};
}