🔗 Link between comments in code. Create anchors and jump to them from anywhere
🎬 Examples
🧠 How it works
Add an anchor comment where you want to jump to: [[AnchorID|Some anchor]]
Reference it elsewhere: [[#AnchorID|Go to anchor]]
Click the link while holding Ctrl (Cmd on macOS) to jump to the anchor. The Anchors view shows all anchors across your workspace
Basic Link β Anchor interaction:

Anchors view (tree of all anchors):
Note: This demo shows the legacy anchor syntax

Click to see legacy syntax demo
(enable commentLinking.enableLegacySyntax in settings)


JavaScript (.js)
TypeScript (.ts)
TypeScript React (.tsx)
JavaScript React (.jsx)
Python (.py)
Rust (.rs)
Go (.go)
C (.c)
C++ (.cpp, .cxx, .cc, .hpp, .h)
C# (.cs)
JSON (.json)
JSON With Comments (.jsonc)
Markdown (.md) - full text support with special syntax
βοΈ Custom File Types
You can extend support to any file type by configuring custom comment syntax in VS Code settings:
Open Settings β Search for commentLinking.customFileTypes OR directly edit your settings.json file
{
"commentLinking.customFileTypes": {
".vue": "js",
".sh": "python"
// Other extensions you want to add support for
}
}
Configuration format:
- Key (e.g.
".vue") - File extension to add support for
- Value - Comment syntax type to use:
"js" - Uses // comments (like JavaScript/TypeScript)
"python" - Uses # comments (like Python/Shell)
📂 Indexing scope & exclusions
- Scans all workspace folders for supported file extensions
- Gitignore support: Uses
.gitignore patterns by default (disable via commentLinking.useGitignore setting)
- Custom exclusions: Create
.commentlinkingignore file in project root to exclude additional files/directories
- Priority:
.commentlinkingignore takes precedence over .gitignore patterns
β¨ Features
- 🔍 Anchors tree view to browse anchors across files
- 🎯 Inline links in comments that jump to anchors
- 🖍οΈ Smart decorations to highlight only the preview text
- 📋 Copy anchor ID from the Anchors view
📦 Installation
- Install the extension
- Reload
VS Code window (you'll be prompted on first install)
📊 Debugging & Logging
To view detailed indexing logs and performance information:
- Open VS Code Output panel (
View > Output)
- Select "Comment Linking" from the dropdown
- Watch real-time indexing progress and timing information
🧪 Development & Testing
To test changes during development:
- Press
F5 to launch Extension Development Host
- Make changes to the code and save
- In the test window, run
Developer: Reload Window to see updates
To build and install the extension manually:
- Install all dependencies:
pnpm install
- Build the extension package:
pnpm package
- Install the generated
.vsix file in VS Code: Extensions > Install from VSIX...
β
Roadmap / ToβDo
- [ ] 📖 Create Markdown preview with link and anchor support
- [ ] 🔗 Add support for creating anchors and links without preview text in backlinks
- [ ] 🔀 Add sorting by line numbers in anchor tree view
- [ ] βοΈ Add support for custom comment types for specific files
- [ ] 🎨 Add functionality to configure anchor and link styles
- [ ] 🔄 Add functionality to disable new syntax if users want to use only legacy syntax
- [ ] 🏷οΈ Add button in anchor tree to toggle between displaying anchor IDs and preview text
- [ ] 🔍 Add support for displaying all links to a specific anchor in the editor
- [ ] 📚 Add and host comprehensive documentation
- [x] 🧵 Support multiline comments (block and triple-quote styles)
- [x] 🌐 Add more languages (e.g.,
Go, Rust) and support .jsx/.tsx
- [x] 📁 Add support for using
.gitignore file as default exclusion file
Made with 😡 by Viktor Kratiuk
| |