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