How to Use IntelliSense and Code Completion in VS Code

Get smarter code suggestions in VS Code. Learn how IntelliSense works, how to trigger it, navigate suggestions, customize behavior, and fix it when it stops working.

5 min read

IntelliSense is VS Code's name for smart code completion. As you type, a list of suggestions appears with methods, variables, properties, snippets, and keywords that fit the current context.

VS Code ships with rich IntelliSense for JavaScript, TypeScript, JSON, HTML, CSS, SCSS, and Less. For every other language, install the matching language extension and IntelliSense activates automatically.

If you are new to VS Code, the beginner setup guide covers which language extensions to install first.

How IntelliSense works

IntelliSense is powered by a language service that analyzes your source code. When the service knows possible completions, suggestions appear as you type. If you keep typing, the list filters to only show items that contain what you typed.

Each suggestion has an icon that tells you its type.

Common icons include methods (cube icon), variables, classes, interfaces, properties, keywords, snippets, and modules.

Trigger suggestions

Suggestions appear automatically while you type. If they do not, or if you want suggestions at a specific point:

  • Press Ctrl+Space (Windows/Linux) or Cmd+Space (macOS) to open the suggestion list manually.
  • Type a trigger character like a period. In JavaScript, typing document. immediately shows available properties and methods.

To close the suggestion list without accepting anything, press Escape.

To see documentation for a method, press Ctrl+Space again while the list is open.

The documentation panel expands to the side. Press Ctrl+Space once more to collapse it.

ActionKey
Move down / up in the listDown Arrow / Up Arrow
Accept selected suggestionTab or Enter
Dismiss the listEscape
Toggle documentation panelCtrl+Space
Toggle suggestion details focusCtrl+Alt+Space

The Enter key behavior is configurable through editor.acceptSuggestionOnEnter. The default value, on, means Enter always accepts. Set it to smart to accept only when the suggestion changes the text, or off to reserve Enter for new lines.

CamelCase filtering

You do not need to type the full start of a method name. Type the uppercase letters only, like cra to find createApplication. This works with the suggestion list open or with tab completion enabled.

Parameter hints

After you accept a method, VS Code shows its parameters. As you type each argument, the current parameter is highlighted.

Press Ctrl+Shift+Space (Windows/Linux) or Cmd+Shift+Space (macOS) to reopen parameter hints if they disappear.

Customize IntelliSense

Open the Settings editor (Ctrl+, / Cmd+,) and search for suggest to see every related option. Two settings cover most customization needs.

The editor.quickSuggestions setting controls where auto-suggestions appear automatically. By default they are enabled outside strings and comments. Set its strings option to false if you want to stop suggestions from popping up while you type prose inside string literals.

The editor.tabCompletion setting is off by default. Turn it on and pressing Tab inserts the best-matching suggestion without needing to open the list first.

Add AI completions with GitHub Copilot

GitHub Copilot adds AI-powered ghost-text suggestions on top of standard IntelliSense. It predicts whole lines or blocks of code and shows them in gray.

To set it up:

Find the extension

Open the Extensions view and search for GitHub Copilot.

Install it

Install the extension published by GitHub.

Sign in

Click the Accounts icon in the bottom-left corner and sign in with GitHub.

Confirm the free plan is active

The Copilot Free plan activates automatically. It includes 2,000 code completions and 50 chat requests each month, with no credit card required.

Copilot suggestions appear as ghost text. Press Tab to accept a suggestion. Press Ctrl+Right Arrow (Windows/Linux) or Cmd+Right Arrow (macOS) to accept one word at a time. Press Escape to dismiss.

When IntelliSense is not working

Restart VS Code

This restarts the language service and often fixes it.

Check your language extension

Open the Extensions view and confirm your language extension is present and enabled.

Check the file type

Look at the language indicator in the Status Bar. If it says "Plain Text," IntelliSense cannot provide language-specific suggestions. Click the indicator and select the correct language.

Check your settings

Verify that editor.quickSuggestions is not disabled and that editor.suggestOnTriggerCharacters is set to true.

Check for a large workspace

VS Code may throttle IntelliSense in large workspaces. Exclude large folders like node_modules using files.exclude in settings.

For JavaScript, missing type declarations can cause sparse suggestions. Most popular libraries ship with types. You can install additional type packages from DefinitelyTyped using npm. For broader coverage of how to fix broken editor features, see IntelliSense not working fixes.

Rune AI

Rune AI

Key Insights

  • IntelliSense shows suggestions automatically as you type. Press Ctrl+Space to trigger it manually at any time.
  • JavaScript, TypeScript, JSON, HTML, CSS, SCSS, and Less have rich IntelliSense built in. For other languages, install a language extension.
  • Use CamelCase filtering: type the uppercase letters of a method name (like 'cra' for 'createApplication') to narrow suggestions quickly.
  • Customize IntelliSense behavior with settings: editor.quickSuggestions, editor.tabCompletion, and editor.acceptSuggestionOnEnter.
  • GitHub Copilot adds AI ghost-text completions on top of standard IntelliSense. Install the Copilot extension and sign in with GitHub to activate the free tier.
RunePowered by Rune AI

Frequently Asked Questions

Why do I only see word-based suggestions and not proper IntelliSense?

Word-based suggestions work for any file. Rich IntelliSense with method signatures, parameter hints, and type information requires a language extension or a language service. JavaScript and TypeScript have it built in. For Python, install the Python extension. For Go, install the Go extension. Check the Extensions view for your language.

How do I make IntelliSense show up automatically?

IntelliSense should appear automatically as you type. If it does not, check editor.quickSuggestions in your settings. Make sure it is enabled for strings and comments if you want suggestions there. You can always trigger it manually with Ctrl+Space (Windows/Linux) or Cmd+Space (macOS).

How do I get AI-powered code completions?

Install the GitHub Copilot extension from the Marketplace and sign in with a GitHub account. The Copilot Free plan gives you 2,000 code completions and 50 chat requests each month at no cost. Copilot suggestions appear as ghost text in the editor alongside regular IntelliSense. See the [Copilot setup guide](/vscode/how-to-set-up-github-copilot-free-in-vs-code) for step-by-step setup.

Conclusion

IntelliSense is VS Code's built-in code completion engine. It suggests methods, variables, and snippets as you type. Trigger it manually with Ctrl+Space. Accept with Tab or Enter. Read more with Ctrl+Space again. If suggestions stop, restart VS Code or check that your language extension is installed and active. For AI-powered completions, sign in to GitHub Copilot from the Accounts menu. To learn snippet-based completions, see how to create custom snippets.