當您將滑鼠懸停在 VS Code 中的變數(例如函式名稱)上時,會出現一個小彈出視窗,顯示函式的定義位置以及其他一些快速細節。此功能的名稱是什么?
我正在一臺新計算機上設定 VS Code,我正在嘗試獲得該功能,但不確定它的名稱。
uj5u.com熱心網友回復:
內置功能被恰當地稱為hover或hovers。
例如,內置
相關的內置設定按 分組*.hover.*,例如:
// Prefer showing hovers above the line, if there's space.
"editor.hover.above": true,
// Controls the delay in milliseconds after which the hover is shown.
"editor.hover.delay": 300,
// Controls whether the hover is shown.
"editor.hover.enabled": true,
...
// Show tag and attribute documentation in hover.
"html.hover.documentation": true,
// Show references to MDN in hover.
"html.hover.references": true,
...
然而,內容取決于檔案的語言(如 VS Code 右下角的狀態欄所示)和/或您安裝的擴展。例如,您說“顯示函式的定義位置”,但對于我的 Python 作業區,它們通常只顯示函式簽名和檔案:

因此,如果您要查找懸停彈出視窗的特定行為/內容,則必須同時檢查內置設定和擴展設定。
擴展修改懸停行為/內容的方式也稱為
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/374883.html
下一篇:如何在正面回顧后排除事件?
