skip to Main Content

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.

enter image description here

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


    1. Install Rust extension
      go to settings.json in .vscode and check rust-analyzer.enable = true

    2. GO to Preferences -> File associations and check for this line
      "*.rs": "rust"

    3. Also in preferences settings try Reset to default option (worked for me many times)

    Login or Signup to reply.
  1. C/C++

    Solution

    1. Check the VSCode settings: Ensure that the appropriate settings for C/C++ are configured correctly in VSCode.

      1. Install C/C++ IntelliSense Extensions in VS Code

      2. Install C/C++ Extension Pack in VS Code

      3. 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.
        enter image description here

      4. 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
      }

      1. Restart Visual Studio Code. If it is not work Restart the system

      2. 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".

      3. Again Restart the VS Code

    Rust

    Solution

    1. Install the rust-analyzer extension in VS Code
    2. Rust and IntelliSense configuration
      Refer to the document for IntelliSense configuration
    3. Restart the VS Code or System
    4. After restarting VS Code or System it also does not work. Restart the rust analyzer. You can give by opening the Command Palette (press Ctrl+Shift+P or Cmd+Shift+P) and searching for "rust-analyzer: Reload workspace" or "rust-analyzer: Restart Workspace".

    enter image description here

    1. Again Restart the VS Code.

    If none of these steps work, you may need to seek additional help from the VSCode community or support team.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search