mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
generated,rust-analyzer: Handle objects with defined properties
They are implemented as submodules instead of an attrset of anything
This commit is contained in:
parent
f823d01002
commit
ad704ddba7
3 changed files with 146 additions and 4 deletions
|
@ -43,6 +43,7 @@ let
|
|||
maximum ? null,
|
||||
items ? null,
|
||||
anyOf ? null,
|
||||
properties ? null,
|
||||
# Not used in the function, but anyOf values contain it
|
||||
enumDescriptions ? null,
|
||||
}@property:
|
||||
|
@ -96,6 +97,13 @@ let
|
|||
kind = type;
|
||||
inherit minimum maximum;
|
||||
}
|
||||
else if type == "object" && properties != null then
|
||||
{
|
||||
kind = "submodule";
|
||||
options = lib.mapAttrs (
|
||||
name: value: mkRustAnalyzerOptionType false "${property_name}.${name}" value
|
||||
) properties;
|
||||
}
|
||||
else if
|
||||
lib.elem type [
|
||||
"object"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue