mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 12:45:24 +02:00
modules/diagnostics: rename source file
This commit is contained in:
parent
4766d05fb1
commit
e84881f46f
2 changed files with 1 additions and 1 deletions
26
modules/diagnostics.nix
Normal file
26
modules/diagnostics.nix
Normal 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})
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue