mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
docs/mdbook: simplify isVisible
This commit is contained in:
parent
7ac283f050
commit
9e6d690104
1 changed files with 2 additions and 6 deletions
|
@ -42,13 +42,9 @@ let
|
||||||
isVisible =
|
isVisible =
|
||||||
opts:
|
opts:
|
||||||
if isOption opts then
|
if isOption opts then
|
||||||
attrByPath [ "visible" ] true opts
|
opts.visible or true
|
||||||
else if opts.isOption then
|
else if opts.isOption then
|
||||||
attrByPath [
|
opts.index.options.visible or true
|
||||||
"index"
|
|
||||||
"options"
|
|
||||||
"visible"
|
|
||||||
] true opts
|
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
filterFunc = filterAttrs (_: v: if isAttrs v then isVisible v else true);
|
filterFunc = filterAttrs (_: v: if isAttrs v then isVisible v else true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue