diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 2189eaf348e..2ea6bc0e971 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -397,7 +397,7 @@ export interface IEditorOptions { /** * Configure the editor's hover. */ - hover?: boolean | IEditorHoverOptions; + hover?: IEditorHoverOptions; /** * Enable detecting links and making them clickable. * Defaults to true. diff --git a/src/vs/editor/contrib/contextmenu/contextmenu.ts b/src/vs/editor/contrib/contextmenu/contextmenu.ts index abdc0f2abd0..a3467f32a75 100644 --- a/src/vs/editor/contrib/contextmenu/contextmenu.ts +++ b/src/vs/editor/contrib/contextmenu/contextmenu.ts @@ -142,7 +142,9 @@ export class ContextMenuController implements IEditorContribution { // Disable hover const oldHoverSetting = this._editor.getConfiguration().contribInfo.hover; this._editor.updateOptions({ - hover: false + hover: { + enabled: false + } }); let menuPosition = forcedPosition; diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index cb68bdb514e..f46a6a4bbd2 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2736,7 +2736,7 @@ declare namespace monaco.editor { /** * Configure the editor's hover. */ - hover?: boolean | IEditorHoverOptions; + hover?: IEditorHoverOptions; /** * Enable detecting links and making them clickable. * Defaults to true. diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 60d0dda6202..992050fd338 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -46,6 +46,7 @@ import { ContextSubMenu } from 'vs/base/browser/contextmenu'; import { memoize } from 'vs/base/common/decorators'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { getHover } from 'vs/editor/contrib/hover/getHover'; +import { IEditorHoverOptions } from 'vs/editor/common/config/editorOptions'; const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /launch\.json$/; @@ -281,7 +282,9 @@ export class DebugEditorContribution implements IDebugEditorContribution { private _applyHoverConfiguration(model: ITextModel, stackFrame: IStackFrame): void { if (stackFrame && model && model.uri.toString() === stackFrame.source.uri.toString()) { this.editor.updateOptions({ - hover: !stackFrame || !model || model.uri.toString() !== stackFrame.source.uri.toString() + hover: { + enabled: !stackFrame || !model || model.uri.toString() !== stackFrame.source.uri.toString() + } }); } else { let overrides: IConfigurationOverrides; @@ -291,9 +294,13 @@ export class DebugEditorContribution implements IDebugEditorContribution { overrideIdentifier: model.getLanguageIdentifier().language }; } - const defaultConfiguration = this.configurationService.getValue('editor.hover', overrides); + const defaultConfiguration = this.configurationService.getValue('editor.hover', overrides); this.editor.updateOptions({ - hover: defaultConfiguration + hover: { + enabled: defaultConfiguration.enabled, + delay: defaultConfiguration.delay, + sticky: defaultConfiguration.sticky + } }); } }