如何在 vscode 中触发文档弹出窗口 [英] How to trigger documentation popup in vscode
问题描述
如何触发带有光标下标识符文档的弹出窗口?通常在使用鼠标指针悬停标识符时出现:
How to trigger a popup with documentation for identifier under the cursor? Normally it appears when hovering the identifier using the mouse pointer:
我想使用命令或键盘快捷键来实现这种效果.
I would like to achieve this effect using a command or keyboard shortcut.
我发现的唯一相关命令是:trigger completion
(不显示函数文档)和 trigger parameters hint
(仅在光标位于内部时有效函数调用 - 参数列表).
The only related commands I found are: trigger completion
(which doesn't show the function doc) and trigger parameters hint
(which only works when the cursor is inside function call - parameters list).
推荐答案
这是 editor.action.showHover
命令.默认绑定到cmdk cmdi.
This is the editor.action.showHover
command. It is bound to cmdk cmdi by default.
注意:通过按住 cmd [ctrl in windows],然后按住 k 然后 i
Note: Shortcut works by holding down the cmd [ctrl in windows], then while holding press k then i
您可以更改键盘快捷键,例如:
{
"key": "cmd+k ctrl+space",
"command": "editor.action.showHover",
"when": "editorTextFocus"
}
这篇关于如何在 vscode 中触发文档弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!