Free & open sourceMIT LicenseIntelliJ IDEA 2026.2

A table of contents for your SQL and HTTP files

Code Comment Navigator reads the Markdown headings you already write in comments — -- # Heading in SQL, // # Heading in HTTP — and shows them as a collapsible Comment Outline on the right side of IntelliJ IDEA. Click a heading to jump to that comment line. It works in project files and in Scratches, where iteration scripts grow longest.

Get it on GitHub See the heading syntax

Version 1.1.0 · MIT License · built for IntelliJ IDEA 2026.2

The illustration above is a mock of an IntelliJ IDEA window: a SQL file on the left whose comment headings (-- # Roles and permissions audit, -- ## Role entities, -- ### Merchant roles, and so on) appear on the right in a Comment Outline tool window as a four-level tree. "Merchant roles" is selected in the tree, and the matching comment line is highlighted in the editor.

How it works

  1. Write headings in comments

    Mark sections with # to ###### inside an ordinary comment line — -- # Heading in SQL, // # Heading in HTTP. A space after the hashes is required. Nothing else about the file changes.

  2. Open Comment Outline

    Click the Comment Outline tab on the right edge, or go to View → Tool Windows → Comment Outline. The editor context menu and the Edit menu also carry the Comment Structure action (Shift+Cmd+F12 in the default keymap).

  3. Click to jump, type to search

    Click a heading — or select it with the up and down keys and press Enter — to jump to that comment line. Typing in the tree searches headings directly.

Iteration scripts in Scratches keep growing: a few hundred lines of SQL with no structure and no quick way back to the section you were reading. The outline gives that file a table of contents without changing how you write it.

Features

Everything the outline does, and nothing it does not.

  • Six heading levels for SQL, HTTP and REST

    .sql, .http and .rest files. Markdown # through ###### become a tree. A skipped level attaches to the nearest shallower heading, and same-level headings keep file order.

  • Click or Enter to jump, type to search

    Click a heading, or move with the up and down keys and press Enter, to jump to the comment line. Type in the tree to search headings — no dialog to open first.

  • Follows the editor, refreshes without saving

    The panel follows whichever editor is selected and rebuilds the outline about 250 ms after an edit. The file does not have to be saved.

  • Expand, collapse, keep your place

    Expand or collapse any node, plus expand-all and collapse-all. Folding state is kept while you edit the same file, and resets to expanded when you switch files.

  • HTTP ### separators, with a plain-comment fallback

    ### Request name separators from the HTTP Client become level-2 nodes, and empty ### lines are skipped. A file with no headings and no request names at all falls back to a flat list of its ordinary comments.

  • The Java and Kotlin popup is still there

    The existing comment navigation popup for Java and Kotlin is retained and opens from the same Comment Structure action (Shift+Cmd+F12).

  • Works in Scratch files as well as project files — ever-growing scratch scripts are the reason this plugin exists.
  • No dependency on the SQL/Database or HTTP Client language plugins: parsing uses the platform Document API.

Heading syntax

Headings are ordinary comments. The database console and the HTTP Client still see plain comments, so a file stays runnable exactly as before.

SQL

-- # Roles and permissions audit
-- ## Role entities
-- ### System templates
SELECT 'system role';

-- ### Merchant roles
SELECT 'merchant role';

-- ## Grant details
/*
 * ### Page permissions
 * #### PRO pages
 */
SELECT 'page permission';
  • -- line comments and /* … */ block comments are both read.
  • Each heading has to sit on its own comment line.
  • Trailing comments after a statement, strings and quoted identifiers are never mistaken for headings.

HTTP

// # Freezer queries
// ## Normal cases
# ### Response field check

### List freezers
GET {{host}}/freezers

// # Replenishment
### Replenishment detail
GET {{host}}/replenishments/example
  • // # Heading is the recommended form; # # Heading — a hash comment plus a Markdown marker — works too.
  • ### Request name is always a level-2 node, so do not use it for level 3; write // ### Heading when you need an explicit level.
  • Empty ### separators are skipped, and comments inside request pre/post scripts are ignored.
HTTP heading levels
Written as Outline level
// # Heading or # # Heading Level 1
// ## Heading Level 2
// ### Heading Level 3
### Request name Level 2 — the HTTP Client request separator

Rules that apply to both

  • A space is required after the hash marker.
  • Levels 1 to 6.
  • A skipped level attaches to the nearest shallower heading.
  • Same-level headings keep file order.
  • Ordinary comments do not pollute an outline that already has explicit headings.
  • A file with no headings and no request names at all falls back to a flat list of ordinary comments.

Install

Two minutes, one command, and an IDE restart when IntelliJ IDEA asks for one.

  1. Marketplace listing is being set up

    The JetBrains Marketplace listing for this plugin is not live yet, and there are no GitHub Releases either. Until it is published, build the installable ZIP yourself — the steps below take one command.

  2. Build from source

    Clone the repository and run ./gradlew test buildPlugin with JDK 25. The installable package is written to build/distributions/comment-navigation-1.1.0.zip.

  3. Install Plugin from Disk

    In the IDE: Settings → Plugins → gear menu → Install Plugin from Disk…, choose the ZIP, and follow the IDE prompts to finish.

  4. Open a SQL or HTTP file

    Open a .sql, .http or .rest file, then click the Comment Outline tab on the right edge, or go to View → Tool Windows → Comment Outline.

This version is built for and verified on IntelliJ IDEA 2026.2 (build 262.*). Earlier IDE versions are not in the compatibility range. Building from source needs JDK 25.

Want to see the outline before installing? The repository ships two example files: SQL example · HTTP example

Frequently asked questions

Is Code Comment Navigator free?

Yes. It is released under the MIT License and is free for personal and commercial use — no purchase, no subscription, no activation key. You may modify it, redistribute it and sell it as long as the copyright and license notices are kept. The software is provided as is, with no fixed update schedule and no promised support response time.

Which IntelliJ IDEA versions does it support?

Version 1.1.0 is built for and verified on IntelliJ IDEA 2026.2 (build 262.*). Earlier IDE versions are not in this compatibility range. Building the plugin from source needs JDK 25.

Do I need the Database or HTTP Client plugins?

No. Parsing uses the platform Document API, so the outline has no dependency on the SQL/Database or HTTP Client language plugins. It reads .sql, .http and .rest files on its own.

Does it send my code anywhere?

No. The plugin contains no network code. It only reads the text of the editor you have open and builds the outline locally inside the IDE.

Why does ### Request name show up as level 2?

Because it is the HTTP Client’s own request separator, and it is always mapped to a level-2 node so existing .http files keep working unchanged. Empty ### lines are skipped. When you need an explicit third level, write // ### Heading instead.

Does it work in Scratch files?

Yes. Project files and Scratches are both supported — the ever-growing iteration scripts people keep in Scratches are the reason the outline exists. Open the scratch SQL or HTTP file and the panel follows the editor as usual.

License and contact

Code Comment Navigator is released under the MIT License, copyright 2024–2026 Fuuqiu (Tinyue). It is free for personal and commercial use — no purchase, no subscription, no activation key.

You may modify it, redistribute it and sell it, as long as the copyright notice and the license notice are kept. The software is provided as is, without warranty. There is no fixed update schedule and no promised support response time.

Links

Questions, bugs and feature requests — open an issue, or write to fuuqiu@gmail.com.