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
066485bf4c
commit
4958ac06d3
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