mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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 =
|
||||
opts:
|
||||
if isOption opts then
|
||||
attrByPath [ "visible" ] true opts
|
||||
opts.visible or true
|
||||
else if opts.isOption then
|
||||
attrByPath [
|
||||
"index"
|
||||
"options"
|
||||
"visible"
|
||||
] true opts
|
||||
opts.index.options.visible or true
|
||||
else
|
||||
let
|
||||
filterFunc = filterAttrs (_: v: if isAttrs v then isVisible v else true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue