Java support
mdoc is awesome, I love it to bits.
In the context of my $work, I maintain tooling (libraries in particular) for both Java and Scala users. I'm wondering how hard it'd be to adapt mdoc to also support java snippets in addition to scala ones. If it's not a herculean amount of work, I'd be interested to contribute this feature.
Kind regards
That should be possible, we would need to do for Java something similar to https://github.com/scalameta/mdoc/blob/main/mdoc/src/main/scala-2/mdoc/internal/markdown/Instrumenter.scala
And then https://github.com/scalameta/mdoc/blob/main/mdoc/src/main/scala-2/mdoc/internal/markdown/MarkdownCompiler.scala
We can use a separate process for compiling Java if it's not possible in process (we do some in process compilation for metals here) and then we would need to class load the compiled file.
It might be some work, maybe with LLM you can get a basic structure, but I am not 100% sure how hard it would all be