You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It would be nice to have a custom way of showing certain values, especially those that involve effects or streaming, e.g. for a cats.effect.IO you might want to display the value of theIO.timeout(5.seconds).unsafeRunSync().
Describe the solution you'd like
Some way of customizing the behavior responsible for displaying values in worksheets. It would probably have to be supported in mdoc itself.
Something like a Show-like typeclass defaulting to toString that we'd be able to override e.g. by importing an instance in a project-wide, or global, ~/.mdoc/predef.scala file.
Describe alternatives you've considered
Currently, the best alternative is adding an extension method that does the job, but it'd be nice to not have to do that for every value of a given type.
Is your feature request related to a problem? Please describe.
It would be nice to have a custom way of showing certain values, especially those that involve effects or streaming, e.g. for a
cats.effect.IO
you might want to display the value oftheIO.timeout(5.seconds).unsafeRunSync()
.Describe the solution you'd like
Some way of customizing the behavior responsible for displaying values in worksheets. It would probably have to be supported in mdoc itself.
Something like a Show-like typeclass defaulting to
toString
that we'd be able to override e.g. by importing an instance in a project-wide, or global,~/.mdoc/predef.scala
file.Describe alternatives you've considered
Currently, the best alternative is adding an extension method that does the job, but it'd be nice to not have to do that for every value of a given type.
Additional context
Search terms:
show, toString, stringify, worksheet, display, custom, effect
The text was updated successfully, but these errors were encountered: