mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 13:19:48 +01:00
fix: make addDescriptionsToMappings recurse on attrsets
This commit is contained in:
parent
351803ace0
commit
201a337a0d
1 changed files with 11 additions and 4 deletions
|
@ -46,10 +46,17 @@ in
|
||||||
# and merges them into
|
# and merges them into
|
||||||
# { someKey = { value = "some_value"; description = "Some Description"; }; }
|
# { someKey = { value = "some_value"; description = "Some Description"; }; }
|
||||||
addDescriptionsToMappings = actualMappings: mappingDefinitions:
|
addDescriptionsToMappings = actualMappings: mappingDefinitions:
|
||||||
self.attrsets.mapAttrs (name: value: {
|
self.attrsets.mapAttrs (name: value: let
|
||||||
|
isNested = self.isAttrs value;
|
||||||
|
returnedValue =
|
||||||
|
if isNested
|
||||||
|
then addDescriptionsToMappings actualMappings."${name}" mappingDefinitions."${name}"
|
||||||
|
else {
|
||||||
value = value;
|
value = value;
|
||||||
description = mappingDefinitions."${name}".description;
|
description = mappingDefinitions."${name}".description;
|
||||||
})
|
};
|
||||||
|
in
|
||||||
|
returnedValue)
|
||||||
actualMappings;
|
actualMappings;
|
||||||
|
|
||||||
mkSetBinding = binding: action:
|
mkSetBinding = binding: action:
|
||||||
|
|
Loading…
Reference in a new issue