mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
update-scripts: Handle missing descriptions for enums
This commit is contained in:
parent
674790dbf9
commit
d63ac3eb39
1 changed files with 11 additions and 4 deletions
|
@ -184,12 +184,15 @@ let
|
||||||
};
|
};
|
||||||
pluginDefault = default;
|
pluginDefault = default;
|
||||||
description =
|
description =
|
||||||
|
let
|
||||||
|
globalDescription = ''
|
||||||
|
${filteredMarkdownDesc}
|
||||||
|
'';
|
||||||
|
in
|
||||||
if
|
if
|
||||||
enum == null && (anyOf == null || builtins.all (subProp: !(lib.hasAttr "enum" subProp)) anyOf)
|
enum == null && (anyOf == null || builtins.all (subProp: !(lib.hasAttr "enum" subProp)) anyOf)
|
||||||
then
|
then
|
||||||
''
|
globalDescription
|
||||||
${filteredMarkdownDesc}
|
|
||||||
''
|
|
||||||
else if enum != null then
|
else if enum != null then
|
||||||
assert lib.assertMsg (anyOf == null) "enum + anyOf types are not yet handled";
|
assert lib.assertMsg (anyOf == null) "enum + anyOf types are not yet handled";
|
||||||
enumDesc enum enumDescriptions
|
enumDesc enum enumDescriptions
|
||||||
|
@ -202,7 +205,11 @@ let
|
||||||
) "anyOf types may currently only contain a single enum";
|
) "anyOf types may currently only contain a single enum";
|
||||||
lib.head subEnums;
|
lib.head subEnums;
|
||||||
in
|
in
|
||||||
enumDesc subEnum.enum subEnum.enumDescriptions;
|
if subEnum ? enumDescriptions then
|
||||||
|
enumDesc subEnum.enum subEnum.enumDescriptions
|
||||||
|
else
|
||||||
|
globalDescription;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rustAnalyzerOptions = builtins.map (
|
rustAnalyzerOptions = builtins.map (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue