VS IntelliSense
I didn’t realize how much I liked Visual Studio Code’s IntelliSense. It’s so helpful. Of the many mistakes I could make in Visual Studio Code (VS), mainly spelling errors, IntelliSense helps me minimize those errors and it’s quite a time saver, when it’s used effectively.
I’m going to be referencing the section on IntelliSense from Visual Studio Code’s website for this article.
Let’s go over five features that should help you better understand IntelliSense.
1. Variety of Languages
Out of the box, VS supports IntelliSense for several of the most popular programming languages like, JavaScript, TypeScript, JSON, HTML, CSS, SCSS, and Less. The extension for these languages are found in VS’s Marketplace.
a. Python — 38.0M users — ms-python
b. C/C++ — 21.0M users — ms-vscode
c. C# — 11.7M users — ms-dotnettools
d. Java Extension Pack — 8.4M users — vscjava
e. Go — 5.1M users — golang
f. Dart — 3.1M users — Dart-Code
g. PHP Extension Pack — 2.3M users — felixfbecker
h. Ruby — 2.0M users — rebornix
2. Language Service
a. IntelliSense is powered by a language service, which “provides intelligent code completions based on language semantics and an analysis of your source code.”
b. IntelliSense can provide pop-up suggestions if a language service knows possible completions.
c. Pressing Tab or Enter will insert the selected member.
d. You can trigger IntelliSense in any editor window by typing a trigger character (such as the dot character (.) in JavaScript).
e. IntelliSense gives both inferred proposals and the global identifiers of the project. The inferred symbols are presented first, followed by the global identifiers.
3. Customizing IntelliSense
You can customize your IntelliSense experience in settings and key bindings.
a. Settings
b. Settings can be changed in the settings.json file as described in User and Workspace Settings.
4. Tab Completion
a. When a suggestion is given, you can press the Tab button to insert that suggestion into your code.
b. Out of the box, tab completion is disabled.
c. This can be enabled in the editor.tabCompletion setting.
d. These values exist:
i. off — (default) Tab completion is disabled.
ii. on — Tab completion is enabled for all suggestions and repeated invocations insert the next best suggestion.
iii. onlySnippets — Tab completion only inserts static snippets which prefix match the current line prefix.
5. Suggestion selection
a. The previously used suggestion in the suggestion list is given by default. This can save a lot of time.
Troubleshooting
a. If IntelliSense has stopped working, one of the best solutions is to restart VS.
b. If that doesn’t resolve the issue, go to the docs for more info on it.
These features are just a few reasons why I like VS’s IntelliSense. IntelliSense can help reduce spelling errors, especially with my faulty keyboard, and it can help reduce time with the suggestions that are given.
What are the features you like?
Have you customized IntelliSense on your machine?