I have not installed any new extensions for a while, but all my language features have been disappeared from VSCode. I’ve narrowed down the problem by disabling all plugins, except the C/C++ IntelliSense (see screenshot below), but the effect is the same.
Update #3: Python, JavaScript, PHP and C# works, C/C++ functions work, variables not, Rust does not work at all.
I have upgraded, re-enabled, restarted, rebooted, reinstalled everything. Both of my machines (Windows11, MacOS) produce the same symptoms, so there must be a – hopefully – trivial configuration error around the Language Server.
Unfortunately, I don’t know anything about how Language Server works, and it’s hard to find information. Where can I check some logs or get status of the running server(s), to see some hints on the error?
2
Answers
Install Rust extension
go to settings.json in .vscode and check rust-analyzer.enable = true
GO to Preferences -> File associations and check for this line
"*.rs": "rust"
Also in preferences settings try Reset to default option (worked for me many times)
C/C++
Solution
Check the VSCode settings: Ensure that the appropriate settings for C/C++ are configured correctly in VSCode.
Install C/C++ IntelliSense Extensions in VS Code
Install C/C++ Extension Pack in VS Code
Configure the IntelliSense settings: Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the Command Palette and search for select "C/C++: Edit Configurations (UI)". To edit the c_cpp_properties.json file.
IntelliSense configuration
Refer to the document for IntelliSense configuration
Example c_cpp_properties.json for ubuntu
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
Example c_cpp_properties.json for windows
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
Restart Visual Studio Code. If it is not work Restart the system
After restarting VS Code or System it also does not work. Check the IntelliSense cache: Sometimes the IntelliSense cache can become corrupted and cause issues with language features. You can try clearing the cache by opening the Command Palette (press Ctrl+Shift+P or Cmd+Shift+P) and searching for "C/C++: Rescan workspace" or "C/C++: Reset IntelliSense Database" or "C/C++: Restart IntelliSense for Active File".
Again Restart the VS Code
Rust
Solution
Refer to the document for IntelliSense configuration
If none of these steps work, you may need to seek additional help from the VSCode community or support team.