Rich Markdown Code Comments is a JetBrains plugin that allows you to embed links to full Markdown notes directly within your source code comments. This plugin helps you keep your code comments concise while providing a way to access detailed documentation, bug reports, or refactoring notes with a single click or hover preview.
To report a bug, use the "Issues" tab above to create a new issue.
For support, you can also email us at richmarkdowncodecomments.justin@gmail.com.
All note files must be located in a folder named notes at the root of your project directory. You can organize these files into subfolders as you see fit.
Example structure:
ProjectRoot/
├── notes/
│ ├── design_notes.md
│ ├── bugs/
│ │ ├── bug_123.md
│ └── refactoring/
│ └── cleanup_task.md
├── src/
│ └── Main.java
You can link to any Markdown file in your notes folder from any comment in your source code using a special tag syntax. The plugin supports three types of links, each with its own customizable highlighting:
- Notes:
{#note:fileName} - Bugs:
{#bug:fileName} - Refactoring:
{#refactor:fileName}
Example:
// {#note:MyClassDesign} Design notes for MyClass.
public class MyClass{
}- Direct filename:
{#note:design_notes}(The.mdextension is optional) - Nested paths:
{#bug:bugs/bug_123} - Recursive search: Even if you just use
{#note:cleanup_task}, the plugin will find it even if it is deep within thenotesfolder hierarchy. Note that in the case of a naming collision, the first hierarchical match will be returned.
When you hover your mouse over a note tag in a comment, a documentation popup will appear showing a rendered HTML preview of the Markdown file's content. This allows you to read detailed information without ever leaving your current file.
- Hover your mouse over a tag like
{#note:my-note}. - Wait for the IDE's documentation popup to appear.
- Scroll through the rendered Markdown content.
There are two ways to open the actual Markdown file for editing or full-screen reading:
- Standard IDE Navigation: Hold
Ctrl(orCmdon macOS) and click the link in the comment. - Single-Click Navigation (Optional): If enabled in settings, you can simply click the link without holding any modifier keys. Your cursor will change to a hand icon when hovering over a clickable link.
Note that if Single-Click Navigation is enabled, you will not be able to click into the middle of a note comment to edit/change the name. You will need to click next to it and navigate over using the keyboard.
You can customize the appearance and behavior of the plugin by going to: Settings/Other Settings > Rich Markdown Comments
If you cannot find this menu option, search for "Rich Markdown Comments" in the Settings dialog.
- Highlight Colors: For each type (Note, Bug, Refactor), you can choose a custom color that the tag will use in the editor.
- Add Highlight Box: Toggles a rounded box around the tag to make it stand out even more.
- Clickable Note References: When enabled, allows you to open note files with a single click (no
Ctrlneeded). This is disabled by default to avoid accidental navigation while clicking around your code.