Visual Studio Code Intellisense is very slow - Is there anything I can do?

前端 未结 7 1598
逝去的感伤
逝去的感伤 2021-01-30 19:28

Edit: Pylance seems to be much better at this and has so far resolved all problems with the previous Python language server from Microsoft.

I\'m using VS Code an

相关标签:
7条回答
  • 2021-01-30 19:53

    It turned out it was a particular VS Code extension for me.
    Angular Language Service. Disabling this made it lightning quick.

    Try this to see if it is a particular extension.

    • Open Command Palette (Ctrl+Shift+P)
    • Type in "Disable all installed extensions"
    • Enable them one by one or in groups and test the intellisense speed
    0 讨论(0)
  • 2021-01-30 19:53

    My answer's for c++ but still kinda related.

    I'm using the C/C++ extension from Microsoft, and when I switched its Intelli Sense Engine setting from Default, with "context-aware results", to Tag Parser, with "'fuzzy' results that are not context-aware", it immediately started showing IntelliSense options instead of delaying for 5+ seconds.

    So maybe check the particular options of your language's or environment's extension(s).

    0 讨论(0)
  • 2021-01-30 19:55

    Maybe it's Jedi. I mean its awesome but ... Tinkering with Jedi myself on bigger code bases I can confirm that it might be uber slow at times and pretty hard to figure out what the problems are... :/

    Solution might be to switch to another language server! The VSCode Python extension has a "Language Server"-setting:

    aka python.languageServer.

    Pylance is MS own new language server. I just tried it and it all seems a little snappier. As of today this is tagged as Preview. So there might be improvements around the corner.

    0 讨论(0)
  • 2021-01-30 20:03

    I had the same problem with Python on VS Code. In my case, disabling Jedi for IntelliSence made things faster.

    Just set "python.jediEnabled": false in the options.

    As memory is not a problem for me, I also enabled code analysis to keep parser trees in memory: "python.analysis.memory.keepLibraryAst": true

    0 讨论(0)
  • 2021-01-30 20:06

    The problem might be with wrong setting configuration.
    You might want to make sure these setting are on:

    Controls if suggestions should automatically show up while typing

    "editor.quickSuggestions": {
      "other": true,
      "comments": false,
      "strings": false
    },
    

    Controls the delay in ms after which quick suggestions will show up

    "editor.quickSuggestionsDelay": 10,
    
    0 讨论(0)
  • 2021-01-30 20:07

    Open Command Palette (Ctrl+Shift+P)

    Select Developer: show running extension

    You will get their list of extensions and their reboot time

    If extension takes more than 500ms to activate there seems to be a problem with it

    You can press on right click and stop it

    more details...

    0 讨论(0)
提交回复
热议问题