I prefer Asciidoc over markdown for documents where chapters, cross references, call outs, etc are valuable. For things that one might want to turn into a PDF.
The tooling is a bit of a pain, but the Java world has pretty good integration (gradle, intellij)
A shout out to the intellij plugin developer. The Asciidoc plugin has so many nice little Features. E.g. consistent file renames, or paste as screenshot which auto creates a file and embeds it.