mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
25 lines
538 B
Nix
25 lines
538 B
Nix
{
|
|
lib,
|
|
helpers,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
options = {
|
|
diagnostics = lib.mkOption {
|
|
type = with lib.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 = lib.mkIf (config.diagnostics != { }) ''
|
|
vim.diagnostic.config(${lib.nixvim.toLuaObject config.diagnostics})
|
|
'';
|
|
};
|
|
}
|