mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
27 lines
543 B
Nix
27 lines
543 B
Nix
|
{
|
||
|
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})
|
||
|
'';
|
||
|
};
|
||
|
}
|