mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
lib/options: remove with helpers
This commit is contained in:
parent
820f8d58ea
commit
bc84fda2b8
1 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,5 @@
|
||||||
{ lib, helpers }:
|
{ lib, helpers }:
|
||||||
with lib;
|
with lib;
|
||||||
with helpers;
|
|
||||||
let
|
let
|
||||||
# Render a plugin default string
|
# Render a plugin default string
|
||||||
pluginDefaultText =
|
pluginDefaultText =
|
||||||
|
@ -90,7 +89,7 @@ rec {
|
||||||
args
|
args
|
||||||
// {
|
// {
|
||||||
type = helpers.nixvimTypes.strLua;
|
type = helpers.nixvimTypes.strLua;
|
||||||
apply = mkRaw;
|
apply = helpers.mkRaw;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
mkNullOrLua = description: mkNullOrLua' { inherit description; };
|
mkNullOrLua = description: mkNullOrLua' { inherit description; };
|
||||||
|
@ -101,7 +100,7 @@ rec {
|
||||||
args
|
args
|
||||||
// {
|
// {
|
||||||
type = helpers.nixvimTypes.strLuaFn;
|
type = helpers.nixvimTypes.strLuaFn;
|
||||||
apply = mkRaw;
|
apply = helpers.mkRaw;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
mkNullOrLuaFn = description: mkNullOrLua' { inherit description; };
|
mkNullOrLuaFn = description: mkNullOrLua' { inherit description; };
|
||||||
|
@ -112,7 +111,7 @@ rec {
|
||||||
args
|
args
|
||||||
// {
|
// {
|
||||||
type = with helpers.nixvimTypes; either strLua type;
|
type = with helpers.nixvimTypes; either strLua type;
|
||||||
apply = v: if isString v then mkRaw v else v;
|
apply = v: if isString v then helpers.mkRaw v else v;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
mkNullOrStrLuaOr = type: description: mkNullOrStrLuaOr' { inherit type description; };
|
mkNullOrStrLuaOr = type: description: mkNullOrStrLuaOr' { inherit type description; };
|
||||||
|
@ -123,7 +122,7 @@ rec {
|
||||||
args
|
args
|
||||||
// {
|
// {
|
||||||
type = with helpers.nixvimTypes; either strLuaFn type;
|
type = with helpers.nixvimTypes; either strLuaFn type;
|
||||||
apply = v: if isString v then mkRaw v else v;
|
apply = v: if isString v then helpers.mkRaw v else v;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
mkNullOrStrLuaFnOr = type: description: mkNullOrStrLuaFnOr' { inherit type description; };
|
mkNullOrStrLuaFnOr = type: description: mkNullOrStrLuaFnOr' { inherit type description; };
|
||||||
|
@ -268,7 +267,8 @@ rec {
|
||||||
"hint"
|
"hint"
|
||||||
]);
|
]);
|
||||||
apply = mapNullable (
|
apply = mapNullable (
|
||||||
value: if isInt value then value else mkRaw "vim.diagnostic.severity.${strings.toUpper value}"
|
value:
|
||||||
|
if isInt value then value else helpers.mkRaw "vim.diagnostic.severity.${strings.toUpper value}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -281,7 +281,7 @@ rec {
|
||||||
// {
|
// {
|
||||||
type = with helpers.nixvimTypes; either ints.unsigned logLevel;
|
type = with helpers.nixvimTypes; either ints.unsigned logLevel;
|
||||||
apply = mapNullable (
|
apply = mapNullable (
|
||||||
value: if isInt value then value else mkRaw "vim.log.levels.${strings.toUpper value}"
|
value: if isInt value then value else helpers.mkRaw "vim.log.levels.${strings.toUpper value}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue