modules: cleanup with lib

This commit is contained in:
Austin Horstman 2024-08-30 14:37:41 -05:00
parent ff042dfc93
commit 1c9ba58aef
No known key found for this signature in database
12 changed files with 79 additions and 85 deletions

View file

@ -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})
'';
};