mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 18:58:43 +02:00
modules: cleanup with lib
This commit is contained in:
parent
ff042dfc93
commit
1c9ba58aef
12 changed files with 79 additions and 85 deletions
|
@ -4,11 +4,10 @@
|
|||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
diagnostics = mkOption {
|
||||
type = with types; attrsOf anything;
|
||||
diagnostics = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = { };
|
||||
description = "The configuration diagnostic options, provided to `vim.diagnostic.config`.";
|
||||
example = {
|
||||
|
@ -19,7 +18,7 @@ with lib;
|
|||
};
|
||||
|
||||
config = {
|
||||
extraConfigLuaPre = mkIf (config.diagnostics != { }) ''
|
||||
extraConfigLuaPre = lib.mkIf (config.diagnostics != { }) ''
|
||||
vim.diagnostic.config(${helpers.toLuaObject config.diagnostics})
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue