IntelliSense doesn’t work in VSCode – possible fixes

IntelliSense is the name for the set of advanced code editing features that assist developers during the coding process. It was equipped with Visual Studio and Visual Studio Code. The feature set includes code completion, parameter info, quick info, member lists and works with a bunch of popular programming languages such as JavaScript, TypeScript, JSON, HTML, CSS, SCSS, and Less.

IntelliSense can also be extended to support other lesser known programming languages by installing a language extension. In VSCode, IntelliSense should be working right out of the box, but after some times, it may stopped working due to unknown reasons. In this article, we will show you a few possible fixes you can apply if IntelliSense is not working.

Language server is not running

vscode language server is not running

IntelliSense depends on a language service process running in the background to provide intelligent code editing features. If you find that IntelliSense has stopped working all of a sudden, there's a chance that the language service has been terminated for some reasons. In this case, a VSCode restart or PC reset is enough to solve the issue.

Select the right JavaScript dialect

If you're coding in JavaScript or TypeScript and finds that VSCode IntelliSense does work but does not behave properly, it's likely that you've selected the wrong language mode. TypeScript and JavaScript share the same language service, so you need to select the right language. You can do that by pressing Ctrl + Shift + P keyboard combination to open the Command Palette and select Change Language Mode, then select the appropriate JavaScript dialect you're working with.

Select the right JavaScript dialect in VSCode

Add C# project information file

If you're working with C# code, you should be aware that IntelliSense, along with advanced editing features, can only be enabled if there's a project.json file or *.sln file inside the project directory.

By default, any time you open a folder/directory, VSCode will scan its contents for project.json and *.sln files and if they're found, load them all.

In case you have a project.json, you have to open a DNX-project and VSCode will load that project plus the referenced projects.

Selecting a *.sln-file is opening a MSBuild-project. It will load the referenced *.csproj-projects and sibling or descendant project.json-files but no other project files that are referenced from the solution file.

Add C# project information file

Install C# extension

If you're starting a new C# project and find out that IntelliSense doesn't work, maybe you haven't install the C# extension for VSCode. There will be a notification pops up asking you to do that.

Enable C# configuration

After install the extension, press Ctrl + Shift + P to bring up the Command Palette, then type in OmniSharp: Select Project and choose the workspace appropriately. You may also need to enable C# formatting in VSCode settings.

enable C# formatting in VSCode settings

Python : Reinstall Python/Pylance extension

Previously, using VSCode with Python, especially in conjunction with virtual environments needs heavy configuration effort. However, since Pylance became the default language server for Python in VSCode, things get easier and closer to "just work". Sometimes it doesn't, though, then you simply need to uninstall and reinstall Python/Pylance to bring IntelliSense back.

Python : Reinstall Python/Pylance extension

We hope that the information above is useful to you. If you're interested in advanced editing features of VSCode, check out our post on how to enable/disable word wrap in VSCode, How to use LaTeX in VSCode or how to automatically indent your code in Visual Studio Code.

If you have any suggestions, feel free to comment below and we will add it to the article.

Click to rate this post!
[Total: 1 Average: 5]

Leave a Comment