To stop Visual Studio Code from autocompleting words, disable the
editor.wordBasedSuggestions setting in your user or workspace settings. This prevents the editor from suggesting identifiers based on text currently open in other files. You can also adjust
editor.quickSuggestions to control when suggestions appear, ensuring a cleaner coding experience without intrusive pop-ups.
Understanding VS Code Suggestion Types
Visual Studio Code offers several layers of intelligent code completion. By default, it provides "quick suggestions" that appear as you type, drawing from the current file and, critically, from all other open files. This behavior is driven by the
wordBasedSuggestions feature. When this is enabled, if you have a variable named
userCount in one tab and start typing
user in another, VS Code may suggest completing it automatically. While helpful for consistency, this can be distracting or incorrect in larger projects with conflicting naming conventions.
Disabling word-based suggestions restricts completions to language-specific keywords and library definitions provided by extensions. This does not remove IntelliSense entirely; you still get smart completions for functions, classes, and methods defined in the current context. It simply removes the heuristic matching against raw text in other buffers.
How to Write Bash Script on VS Code Beginner
Disabling Word-Based Suggestions via Settings UI
The most accessible way to change this behavior is through the graphical settings interface. Follow these steps to turn off word-based auto-completion:
- Open the Command Palette by pressing
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
- Type "Preferences: Open User Settings" and select it to open the
settings.json or the visual editor.
- In the search bar at the top, type
wordBasedSuggestions.
- Locate the setting labeled Editor: Word Based Suggestions.
- Uncheck the box or set the value to
false.
This change applies immediately. The next time you type, VS Code will no longer scan open files for similar words to complete. If you prefer editing the JSON file directly, add the following line to your
settings.json:
{
"editor.wordBasedSuggestions": false
}
Controlling Quick Suggestions Behavior
Even with word-based suggestions disabled, VS Code might still show pop-ups for language-specific features like function parameters or property names. This is controlled by the
editor.quickSuggestions setting. You can fine-tune when these appear using an object with three boolean keys:
- other: Controls suggestions from other languages (e.g., HTML inside CSS).
- comments: Controls suggestions within comment blocks.
- strings: Controls suggestions inside string literals.
To completely stop any automatic pop-up while typing, set all values to
false. This forces you to explicitly trigger suggestions using
Ctrl+Space (or
Cmd+Space on macOS). This approach gives you full manual control over when IntelliSense appears, which many developers prefer for faster workflow.
{
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
}
}
Adjusting Trigger Keys and Delay
If you still find suggestions appearing too aggressively, you can adjust the delay before they show up. The
editor.suggestOnTriggerCharacters setting controls whether suggestions appear immediately after typing specific characters like dots (
.), colons (
:), or parentheses (
(). Setting this to
false prevents instant pop-ups after these common delimiters.
Additionally, the
editor.minimap.enabled setting is unrelated to autocomplete but often confused with performance issues. However, for autocomplete specifically, the
editor.suggestSelection setting determines how the first suggestion is chosen. Setting it to
"recentlyUsed" or
"recentlyUsedByPrefix" can make manual selection more predictable once you do decide to use suggestions.
Font Rendering Issue in Visual Studio Code on CachyOS (Arch Linux)
Extension Interference
Some language extensions override VS Code's default completion provider. For example, the Python extension, JavaScript/TypeScript ESLint integration, or Prettier formatters may inject their own completion lists. If disabling
wordBasedSuggestions doesn't solve the problem, check the active extensions. Look for extensions that provide "IntelliSense" or "Code Completion." You can disable specific extensions temporarily to see if the unwanted suggestions stop.
In some cases, you may need to configure the extension itself. For instance, the Python extension has its own
python.analysis.completeFunctionParens setting. Review the documentation of any active language-specific extensions to ensure they aren't forcing completions despite your global settings.
Frequently Asked Questions
Will disabling word-based suggestions break my code?
No, disabling this setting only affects the source of suggestions, not the functionality of your code. Your program will run exactly as before. You will just lose the ability to have variables auto-completed from other open files, which requires you to type names manually or rely on language-defined symbols.
How do I manually trigger suggestions if I turn them off?
You can manually trigger the suggestion list by pressing
Ctrl+Space on Windows/Linux or
Cmd+Space on macOS. This opens the IntelliSense popup regardless of the
quickSuggestions or
wordBasedSuggestions settings, giving you on-demand access to completions.
Can I enable word-based suggestions for only specific languages?
VS Code does not support enabling word-based suggestions per language natively. The
editor.wordBasedSuggestions setting is global. To achieve selective behavior, you would need to use different workspaces with distinct settings files, or rely on language-specific extension configurations that might offer their own filtering options.
Why do suggestions still appear after I set quickSuggestions to false?
If suggestions still appear, it is likely due to
editor.suggestOnTriggerCharacters being enabled. This setting causes suggestions to pop up automatically after typing characters like
. or
:, independent of the general quick suggestions toggle. Set this to
false to fully disable automatic triggers.
Does this setting affect snippet completions?
No, snippet completions are handled separately by the
editor.snippetSuggestions setting. Disabling word-based suggestions or quick suggestions does not prevent snippets from appearing. Snippets are triggered either by typing their prefix or by selecting them from the suggestion list, depending on your configuration.