Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>JS Keyword SuggestNew to Visual Studio Code? Get it now.
JS Keyword Suggest

JS Keyword Suggest

Amiya

| (0) | Free
Suggests correct JavaScript keywords for misspelled terms instantly, with auto-correction and Ctrl+Space support.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JS Keyword Suggest & Error Highlighter

VSCode JavaScript

JS Keyword Suggest is a Visual Studio Code extension that helps developers detect typos in JavaScript keywords, undeclared variables, and provides inline suggestions and strikethrough highlighting for potential errors, improving code quality and reducing bugs.


Features

  • ✅ Detects typos in JavaScript keywords (function, return, console, etc.).
  • ✅ Highlights potential errors in the editor using strikethrough red decoration.
  • ✅ Suggests the closest correct keyword using Levenshtein distance.
  • ✅ Tracks the last 10 recently typed words for real-time suggestions.
  • ✅ Provides inline CodeLens suggestions to quickly replace typos.
  • ✅ Automatically refreshes diagnostics when opening a file, typing, or fixing a typo.
  • ✅ Compatible with plain JavaScript files (.js) and ES modules (type: module).
  • ✅ Can be combined with ESLint or TypeScript for enhanced undeclared variable detection.

Installation

  1. Install from VSCode Marketplace (or run from VSIX locally).
  2. Open a JavaScript file in VSCode.
  3. Make sure "checkJs": true in your jsconfig.json for stricter checking (optional but recommended).
{
  "compilerOptions": {
    "checkJs": true,
    "noEmit": true,
    "target": "ES2020"
  },
  "include": ["**/*.js"]
}

Usage

  1. Typo Detection:

    • Typo keywords are automatically highlighted in red strikethrough.
    • Hover or click CodeLens above the typo to see suggestions.
  2. Undeclared Variables:

    • Undeclared variables (in strict mode or with checkJs) are highlighted similarly.
  3. Fixing Typos:

    • Click the CodeLens suggestion to replace the typo instantly.
    • The extension refreshes diagnostics automatically after replacement.

Configuration

No extra configuration is needed. Optional:

  • Auto-refresh interval can be changed in the extension code (default: 5s).
  • Add custom keywords to the keywords array in the extension source.

Example

functon sayHello() {
  console.log("Hello"); // ❌ 'functon' highlighted, suggestion: 'function'
}
  • functon typo will show a CodeLens suggestion: Replace with 'function'.

Tech Stack

  • VSCode Extension API
  • TypeScript & JavaScript
  • Levenshtein distance (fast-levenshtein)
  • Regex & CodeLens for inline suggestions

Known Limitations

  • Works best with plain .js files and modern ES modules.
  • Detection of undeclared variables depends on TypeScript checking (checkJs) or ESLint configuration.
  • Does not currently detect variables across multiple files or dynamic imports.

Contributing

  1. Mail me on amiyamaity7105@gmail.com.
  2. I'll send you the zip.
  3. Change according to you and use it.
  4. For review send on the same email, if found useful, i'll update on marketplace, with proper credits

License

MIT License © 2025

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