我在 Windows 上使用 python 进行 VS 代码时遇到问题。
自动完成和颜色语法非常慢(超过 153 秒)。我尝试禁用此处提到的所有扩展Visual Studio Code Intellisense is very slow - Is there anything I can do?但没有任何改善。 我的 python 文件非常小(60 行)。
[Info - 13:49:36] (32004) [IDX(2)] Long operation: index libraries c:\Users\XXX\XXX.py (2089ms)
[Info - 13:49:36] (32004) Indexer done(2). indexed 504 files
[Info - 13:52:07] (32004) [BG(1)] Long operation: getSemanticTokens full at c:\Users\XXX\XXX.py (153210ms)
[Info - 13:53:43] (32004) [FG] Long operation: completion at c:\Users\XXX\XXX.py:33:12 (5334ms)
有什么提示可以解决我的问题吗?
编辑:
- Python 3.10.1 - 64 位
- 皮兰斯 V2022.2.1
- VScode 1.64.2
- Windows 10
最佳答案
我昨天遇到了类似的问题,并尝试重新安装 VSCode,但 pylance 仍然 super 慢(启动时正常,但越来越慢)。
今天早上,我尝试安装旧版本的 PyLance 扩展 (v2022.1.5),现在似乎可以正常工作了。
关于python - VS code python 自动补全非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71126862/