Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Comment Doc LensNew to Visual Studio Code? Get it now.
Comment Doc Lens

Comment Doc Lens

tanzz

|
1 install
| (0) | Free
Show definition comments and symbol documentation inline at reference sites.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Comment Doc Lens

Comment Doc Lens displays definition comments and symbol documentation inline at reference sites as VS Code inlay hints.

The first version targets Go, TypeScript, JavaScript, TSX, and JSX by reusing the language services already available in VS Code. Go projects should install the official Go extension with gopls enabled for best results.

What it shows

Comment Doc Lens shows symbol documentation comments, not runtime values. It scans visible identifiers, asks the active VS Code language service for hover and definition information, then renders the first useful documentation line as an inlay hint.

The default TypeScript and JavaScript path is verified for constants, variables, enum members, functions, class methods, object methods, TSX references, and JSDoc. Go support depends on the official Go extension and gopls.

Hints are rendered at the end of the source line so they do not split expressions in the middle of a statement. The text prefix defaults to // and can be customized with commentDocLens.hintPrefix. By default, the first useful documentation line is truncated to 120 characters. You can tune this with commentDocLens.maxHintLength.

Noise and performance controls

The extension filters declaration names, JSX tag names, and intermediate property-chain segments by default. It also deduplicates repeated line summaries, limits concurrent documentation lookups, times out slow lookups, and bounds resolver cache growth.

Relevant settings:

  • commentDocLens.maxHintsPerRequest
  • commentDocLens.maxHintLength
  • commentDocLens.minIdentifierLength
  • commentDocLens.preferPropertyTail
  • commentDocLens.dedupeLineHints
  • commentDocLens.resolveTimeoutMs
  • commentDocLens.maxCacheEntries
  • commentDocLens.hintPrefix

Known limits

Comment Doc Lens only runs for file documents in the configured first-version languages. Coverage and wording depend on each language service's hover and definition providers. When hover has no usable documentation, the extension also tries to read leading source comments near the definition, which improves Go behavior when gopls returns signature-only hover content. Timeout handling prevents stale hints from being displayed, but VS Code command calls that are already in flight cannot be forcibly cancelled by this extension.

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