Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Inline JSDoc HintsNew to Visual Studio Code? Get it now.
Inline JSDoc Hints

Inline JSDoc Hints

Peckage

|
4 installs
| (0) | Free
Shows the JSDoc summary of a symbol inline in the VS Code completion list row, without requiring the documentation panel to be expanded.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Inline JSDoc Hints

Surface JSDoc summary text directly inside the VS Code completion list — the grayed text to the right of the item label — without expanding the documentation side panel.


Features

  • Zero-friction discovery — the first sentence of a symbol's JSDoc comment appears inline next to its name in the completion list, so you know why a function exists before you select it.
  • TypeScript Language Service Plugin (primary path) — runs inside tsserver itself, so there is no duplicate-item overhead and no extra round-trips.
  • Fallback CompletionItemProvider (optional) — for non-TS workspaces or when the plugin is not yet loaded.
  • Non-destructive tsconfig editing — uses jsonc-parser to preserve comments and formatting when modifying tsconfig.json.
  • Works in remote/SSH/WSL workspaces — path resolution uses workspaceFolders, not __dirname.

Installation

VS Code Marketplace

Search for "Inline JSDoc Hints" in the Extensions panel, or run:

ext install Peckage.inline-jsdoc-hints

Manual (VSIX)

  1. Download the .vsix from the Releases page.
  2. In VS Code: Extensions → ⋯ → Install from VSIX…

Setup

No manual setup required in VS Code. The extension declares itself as a TypeScript Language Service Plugin via contributes.typescriptServerPlugins, so VS Code loads it automatically when you open any TypeScript or JavaScript file.

If you also use non-VS Code editors (neovim, Zed, etc.) and want the hints there too, run:

Command Palette → Inline JSDoc Hints: Add Plugin to tsconfig.json

This adds the plugin entry to your workspace's tsconfig.json. You will be shown exactly what will be written before anything changes.

To undo: Command Palette → Inline JSDoc Hints: Remove Plugin from tsconfig.json


How the TypeScript Plugin Mechanism Works

VS Code ships a bundled TypeScript language server (tsserver). It supports a plugin API (see the official wiki) that allows extensions to run code inside tsserver's process and wrap its service methods.

This extension registers a plugin that wraps getCompletionsAtPosition. When tsserver computes a completion list it passes the results through the plugin, which:

  1. Calls getCompletionEntryDetails for each entry (reusing already-cached symbol information — no second analysis pass).
  2. Extracts the first sentence from the documentation display-parts array.
  3. Stores it in entry.labelDetails.description.

Because labelDetails.description is the field VS Code renders as the grayed inline text in each completion row, the hint appears without any extra user interaction.

VS Code passes your inlineJsdocHints.* settings to the plugin automatically via the TypeScript extension API, so changes to settings take effect without restarting the TS server.


Configuration

All settings are under the inlineJsdocHints prefix.

Setting Type Default Description
enabled boolean true Master on/off switch.
maxLength integer 72 Max chars shown. Truncated with …. Range: 20–120.
extractionStrategy string "firstSentence" See below.
showInDetail boolean false Append to type-signature detail instead of labelDetails.
includeLanguages string[] ["typescript","typescriptreact","javascript","javascriptreact"] Languages for the fallback provider.
fallbackProviderEnabled boolean false Enable the fallback CompletionItemProvider.
ignoredSymbolPrefixes string[] [] Skip items whose label starts with these strings.

Extraction strategies

Value Behaviour
firstSentence Text up to the first ". " (or end of text).
firstLine Text up to the first newline.
full Entire JSDoc summary, respecting maxLength.

Example settings.json

{
  "inlineJsdocHints.maxLength": 60,
  "inlineJsdocHints.extractionStrategy": "firstLine",
  "inlineJsdocHints.ignoredSymbolPrefixes": ["__", "$internal"]
}

Troubleshooting

Verify the plugin is loaded

Open the Output panel and select "Inline JSDoc Hints" from the dropdown. You should see an activation message and any errors.

To confirm tsserver has loaded the plugin, open a .ts file and run TypeScript: Open TS Server Log from the Command Palette. Search for inline-jsdoc-hints — you should see it listed under loaded plugins.

Hints are not appearing

  1. Confirm inlineJsdocHints.enabled is true.
  2. Make sure the extension is installed and active (check the Output channel).
  3. If using a workspace TypeScript version, ensure inlineJsdocHints → enableForWorkspaceTypeScriptVersions is respected (it is enabled by default).
  4. Try restarting tsserver: Command Palette → TypeScript: Restart TS Server
  5. Check the Output channel for error messages.

Force-restart tsserver

Command Palette → TypeScript: Restart TS Server

Fallback provider shows duplicate items

The fallback provider is disabled by default. If you have enabled it in a workspace that also has the TS plugin active you may see duplicates. Disable the fallback via inlineJsdocHints.fallbackProviderEnabled: false.


Contributing

git clone https://github.com/Peckage/inline-jsdoc-hints.git
cd inline-jsdoc-hints
npm install
npm run build   # production bundles + plugin stub
npm run dev     # watch mode
npm run test    # unit + integration tests
npm run lint    # ESLint
npm run format  # Prettier

PRs are welcome. Please include tests for any new behaviour.


License

MIT — see LICENSE.

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