mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules/diagnostic: init
This commit is contained in:
parent
66b23fff80
commit
39d1c95061
2 changed files with 27 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
./clipboard.nix
|
||||
./colorscheme.nix
|
||||
./commands.nix
|
||||
./diagnostic.nix
|
||||
./doc.nix
|
||||
./editorconfig.nix
|
||||
./filetype.nix
|
||||
|
|
26
modules/diagnostic.nix
Normal file
26
modules/diagnostic.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