How can I toggle inlay hints in Visual Studio Code?

In the latest version of Visual Studio Code, the default settings have changed and inline parameter hints are always shown in the code despite me not using any setting for it. How do I disable them?

Example (predicate and searchString):

// in the below code, the text "predicate: " and "searchString: "
// are not actual contents of the file. They are inlay hints.
const indexOfFirstSummary = paragraphs.findIndex(predicate: (p) => 
    p.startsWith(searchString: 'Focused development of the sixth edition')
const indexOfFirstNonSummary = paragraphs.findIndex(predicate: (p) => 
    p.startsWith(searchString: 'Dozens of individuals representing many organisations')

To disable the inline parameter name hints (called Inlay Hints) in the latest versions of Visual Studio Code, follow these steps:


Option 1: Disable Inlay Hints for All Languages

  1. Open Command Palette:
  • Ctrl+Shift+P (or Cmd+Shift+P on macOS)
  1. Type and select:
    3.*“Preferences: Open Settings (UI)”**
  2. In the search bar, type:
    5.inlay hints*
  3. Uncheck the option:
    7.Editor › Inlay Hints: Enabled*

Option 2: Disable Inlay Hints for JavaScript/TypeScript Only

  1. In Settings (UI), search:
javascript inlay hints
  1. Uncheck the following options under:
  • JavaScript › Inlay Hints: Parameter Names: Enabled
  • JavaScript › Inlay Hints: Parameter Names: Suppress When Argument Matches NameRepeat for TypeScript if needed:
typescript inlay hints

Alternatively, Add to settings.json:

Open settings.json (Ctrl+Shift+P → “Preferences: Open Settings (JSON)”) and add:

"editor.inlayHints.enabled": "off",
"typescript.inlayHints.parameterNames.enabled": "none",
"javascript.inlayHints.parameterNames.enabled": "none"

This will completely remove the predicate: and searchString: style hints from your code as shown in your screenshot.

Let me know if you need it disabled for a specific language or workspace only!