[英]how do I tell visual studio code to show intellisense for built in python functions like range()
I am entering a line in Visual Studio Code that contains the range function.我在 Visual Studio Code 中输入一行,其中包含范围 function。 I was expecting to see it show me the arguments for the range function.我期待看到它向我展示 function 范围的 arguments。 Instead, I see in a dropdown, where I can click range in the dropdown list.相反,我在下拉列表中看到,我可以在下拉列表中单击范围。 And after that it fills in start, stop, range for the arguments for the function.之后,它会为 function 填充 arguments 的开始、停止和范围。 This means I have to change these values.这意味着我必须更改这些值。 I was hoping the IDE would show me what the valid arguments are.我希望 IDE 能告诉我有效的 arguments 是什么。 Am i missing something?我错过了什么吗?
I use the VS Code Extension IntelliSense (Pylance)
whose owner is Microsoft
.我使用所有者为Microsoft
的VS Code Extension IntelliSense (Pylance)
。 This is the best extension for auto completion and functions/modules description这是自动完成和功能/模块描述的最佳扩展
Extension 扩大
If you have this extension and still facing the same issue then try reinstalling.如果您有此扩展程序但仍然面临同样的问题,请尝试重新安装。
Don't use the web version of VS Code.不要使用 VS Code 的 web 版本。
Restart once after installation is finished.安装完成后重新启动一次。
Also make sure to have Python
installed on your system.还要确保在您的系统上安装了Python
。
While writing the range() function
在写range() function
While hovering over the range() function
将鼠标悬停在range() function
I personally use an autocomplete engine known as TabNine.我个人使用称为 TabNine 的自动完成引擎。 I used to use Kite, and the built in intellisense provided with the VSCode IDE, however, TabNine has proved very reliable to me, and has built-in support for many modules.我曾经使用 Kite,VSCode IDE 提供了内置的智能感知,然而,TabNine 对我来说非常可靠,并且内置了对许多模块的支持。 You can download it in the extensions section of VSCode, by looking up TabNine.您可以通过查找 TabNine 在 VSCode 的扩展部分下载它。
This is the official TabNine website.这是 TabNine 的官方网站。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.