-
Notifications
You must be signed in to change notification settings - Fork 32.8k
debug: debug.hideNonDebugHovers #48747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The semantics of What's about |
@weinand I try to respect that rule for DAP attributes, since the configurationService has nice api to give me the default value I am not so worried from the implementation side. I am open for changing it |
How about:
I don't know... |
@alexandrudima thanks for the suggestions, after discussing with @weinand we landed on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Some minor feedback.
@@ -340,6 +341,17 @@ export class DebugEditorContribution implements IDebugEditorContribution { | |||
return new RunOnceScheduler(() => this.hoverWidget.hide(), HOVER_DELAY); | |||
} | |||
|
|||
@memoize | |||
private get provideNonDebugHoverScheduler(): RunOnceScheduler { | |||
return new RunOnceScheduler(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this disposed?
private get provideNonDebugHoverScheduler(): RunOnceScheduler { | ||
return new RunOnceScheduler(() => { | ||
const model = this.editor.getModel(); | ||
const supports = HoverProviderRegistry.ordered(model); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not simply call getHover
(from getHover.ts
) ?
@@ -362,6 +374,10 @@ export class DebugEditorContribution implements IDebugEditorContribution { | |||
return; | |||
} | |||
|
|||
if (!this.configurationService.getValue<IDebugConfiguration>('debug').hideNonDebugHovers) { | |||
this.nonDebugHoverPosition = mouseEvent.target.position; | |||
this.provideNonDebugHoverScheduler.schedule(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also .cancel()
this somewhere?
@alexandrudima @weinand thanks a lot for feedback, I have addressed it. Merging in |
What does this setting do? I assumed it would call by normal hover provider (so that I can see the nice documentation on methods when hovering, even in a debug session) but even with the setting set to |
Actually, it is calling my provider now - but it's still not rendering anything. Are there some rules about when it will render? Should it combine the info from the debugger and the normal hovers? (and what does "Regular hovers will not be shown even if this setting is true" mean?). |
Hi @DanTup while a user is debugging all other hovers will not be rendered. That setting is just such that the extension hover provider still gets called with the position even though the hover would not be rendered. It sounds a bit weird but was a specific use case for one extenstion. So what you are seeing is designed behavior for now. Thanks |
Aha, gotcha. Thanks for the explanation! :) |
fixes #48733
Introduces a settings
debug.hideNonDebugHovers
. Feedback on the name and description are very welcome.@alexandrudima as you gave me the pointer I am simply
provideHover
with a 300 ms delay so it does not get spammed. Note that I do not do anything if debug is not active and in a stopped state since then I do not hide the regular hover.