Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DocMapNew to Visual Studio Code? Get it now.
DocMap

DocMap

sandwich-lab

|
1 install
| (0) | Free
Semantic mappings between docstrings and code snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DocMap

DocMap automatically builds semantic mappings between docstring segments and corresponding code snippets, making it easier to understand how documentation relates to actual implementations.

DocMap was initially intended as a research project developed by Ningzhi Tang during May 17-19, 2025. Later, its core idea of building natural-language-to-code mappings was incorporated into NaturalEdit.

Demo

https://github.com/user-attachments/assets/6848007d-3d63-4102-9066-d7e946efa008

Features

Automatic element detection

Scans your codebase for all documentable elements (functions, classes, declarations) using a Tree-sitter parser with language-specific queries. Currently supports Python, JavaScript, and TypeScript, with easy extensibility to Java, C, and more.

Docstring generation

For elements without documentation, click Generate Document to automatically generate a docstring.

Semantic mapping

For elements that already have docstrings, click Build Mapping to align each docstring segment with its relevant code. Powered by LLMs with in-editor text alignment.

Interactive highlighting

When a docstring is detected, a clickable marker appears inline beside it. Click the marker to build the mapping and reveal the aligned code spans above the docstring. Hover over a docstring segment to highlight the corresponding code. Click to lock the highlight for long code blocks. Hover over highlighted code to see the linked docstring segment.

Requirements

DocMap uses the OpenAI API to generate and map docstrings. You will need a valid OpenAI API key.

On first use, the extension will prompt you to enter your key. It is stored locally in VS Code's global state and never sent anywhere other than the OpenAI API.

Extension Settings

This extension does not require any additional configuration beyond the API key setup above.

Release Notes

1.0.0

Initial release of DocMap.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft