简体   繁体   English

如何告诉 Visual Studio 代码为内置 python 函数(如 range())显示智能感知

[英]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 .我使用所有者为MicrosoftVS 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.

相关问题 Visual Studio Code Intellisense 非常慢——有什么我可以做的吗? - Visual Studio Code Intellisense is very slow - Is there anything I can do? 如何在 Visual Studio (VS) 代码上获得 Intellisense 以在 Python 上工作 - How to get Intellisense on Visual Studio (VS) Code to work on Python 如何使用 anaconda3 在 Visual Studio Code 中为 python 启用智能感知? - How to enable intellisense for python in Visual Studio Code with anaconda3? Visual Studio Code 中的 IntelliSense 不适用于 python 包 - IntelliSense in Visual Studio Code not working with python packages IntelliSense 不适用于 Visual Studio Code/嵌入式 python - IntelliSense not working with Visual Studio Code/embeddable python Visual Studio 代码 Python 智能感知问题 - Visual Studio Code Python Intellisense Issue 如何在Visual Studio Python中禁用Intellisense数据库 - How to disable intellisense database in visual studio python Visual Studio如何将Python模块添加到Intellisense - Visual Studio How to add Python module to Intellisense 如何在 Visual Studio 代码中调试从 f2py 接口调用共享库中的 c 函数的 python 程序 - How do I debug in visual studio code a python program that calls c functions in a shared library from a f2py interface 如何使用Python IDLE查看内置函数的代码? - How do I view the code for built-in functions using the Python IDLE?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM