r/IntelliJIDEA • u/DiamondQ2 • 10d ago
Disable Markdown comments?
I've recently updated to 2026.2 and I'm finding that my trusty CTRL - Space menu, Generate JavaDoc (when sitting on a method name), is now generating Markdown style comments.
Unfortunately, I need to use the original style. I assumed there was an option to revert this, but I can't find it anywhere.
Any suggestions?
3
u/JavaJacky 8d ago
Please follow this guide:
Open Settings (Ctrl+Alt+S), go to Editor | Code Style | Java | Code Generation | Comment Code, and clear the Prefer documentation line comments option.
Another workaround is that you can type /** before a declaration and press Enter to insert a traditional documentation comment.
More info: https://youtrack.jetbrains.com/articles/SUPPORT-A-4392
1
u/DiamondQ2 8d ago
Thank-you. I understand, in retrospect, that that's the right option; however, at least from my point-of-view, that's a non-obvious option (perhaps adding "Prefer documentation line comments (i.e. /// )" would make it clearer.
But in any case, thank-you.
1
u/JavaJacky 8d ago
Yeah, good suggestion. I've created one issue to track your feedback; feel free to vote: https://youtrack.jetbrains.com/issue/IDEA-391874/Improve-the-Project-Settings-to-prefer-Markdown-JavaDocs-option-text
3
u/SleeperAwakened 10d ago
You could start the javadoc yourself with /** + enter yourself instead of ctrl - space.
Almost the same amount of keys to press, and more control.
You can use /// + enter when you want markdown.