diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index eee7baf03c6..b9a7019a0ff 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -2031,6 +2031,11 @@ export interface IEditorHoverOptions { * Defaults to true. */ sticky?: boolean; + /** + * Controls how long the hover is visible after you hovered out of it. + * Require sticky setting to be true. + */ + hidingTimeout?: number; /** * Should the hover be shown above the line if possible? * Defaults to false. @@ -2049,6 +2054,7 @@ class EditorHover extends BaseEditorOption this._onEditorMouseDown(e))); this._toUnhook.add(this._editor.onMouseUp((e: IEditorMouseEvent) => this._onEditorMouseUp(e))); @@ -255,7 +257,7 @@ export class ModesHoverController implements IEditorContribution { this._hideWidgetsTimeout = setTimeout(() => { this._hideWidgets(); this._hideWidgetsTimeout = undefined; - }, 1000); + }, this._hidingTimeoutDelay); this._mouseWasOverWidget = false; } else { this._hideWidgets(); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 8fbfcd493ae..15d7529a5e3 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -4168,6 +4168,11 @@ declare namespace monaco.editor { * Defaults to true. */ sticky?: boolean; + /** + * Controls how long the hover is visible after you hovered out of it. + * Require sticky setting to be true. + */ + hidingTimeout?: number; /** * Should the hover be shown above the line if possible? * Defaults to false.