Skip to content

Make auto-signature help respect popover delay#46745

Merged
SomeoneToIgnore merged 4 commits intozed-industries:mainfrom
TheSalarKhan:fix-46191
Jan 23, 2026
Merged

Make auto-signature help respect popover delay#46745
SomeoneToIgnore merged 4 commits intozed-industries:mainfrom
TheSalarKhan:fix-46191

Conversation

@TheSalarKhan
Copy link
Contributor

Closes #46191

Release Notes:

  • Make the auto signature popover — "auto_signature_help": true — respect hover_popover_delay.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 13, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jan 13, 2026
@maxdeviant maxdeviant changed the title make auto-signature help respect popover delay Make auto-signature help respect popover delay Jan 13, 2026
return;
}

self.signature_help_state.task = None;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the task incase the previous one is waiting on timer or LSP and we're starting a new one.

Also important when the current iteration will exit early — incase the cursor has exited the region inside the parenthesis of a function.

Comment on lines +189 to +199
// respect hover_popover_delay
let signature_help_delay_ms = EditorSettings::get_global(cx).hover_popover_delay.0;

self.signature_help_state
.set_task(cx.spawn_in(window, async move |editor, cx| {
// wait for debounce delay
if signature_help_delay_ms > 0 {
cx.background_executor()
.timer(Duration::from_millis(signature_help_delay_ms))
.await;
}
Copy link
Contributor Author

@TheSalarKhan TheSalarKhan Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read the global setting, and before awaiting on the lsp task, await on the timer if non-zero.

@TheSalarKhan
Copy link
Contributor Author

TheSalarKhan commented Jan 19, 2026

Hi @maxdeviant, can you help me take this forward? Seems like I'll need a maintainer to trigger workflows.

Thanks!

@SomeoneToIgnore SomeoneToIgnore self-assigned this Jan 22, 2026
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Can we please remove all the useless comments that repeat the code below verbatim?
And, please, can we add a test for this? editor_tests.rs should contain the signature help-related tests as an example.

@TheSalarKhan
Copy link
Contributor Author

TheSalarKhan commented Jan 22, 2026

Hi @SomeoneToIgnore

Thanks for guiding me on the next steps.

I've removed the useless comments, and I've added coverage for the new code to an existing test for signature help.

Could you please review this now.

cx.update_global::<SettingsStore, _>(|settings, cx| {
settings.update_user_settings(cx, |settings| {
settings.editor.auto_signature_help = Some(true);
settings.editor.hover_popover_delay = Some(DelayMs(300));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add hover_popover_delay for coverage.

Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) January 23, 2026 00:05
@SomeoneToIgnore SomeoneToIgnore merged commit 5418c91 into zed-industries:main Jan 23, 2026
43 of 45 checks passed
@xdBronch
Copy link
Contributor

was it intended that this applies to all forms of signature help? the mentioned issue only referred to auto_signature_help but this also affects show_signature_help_after_edits and manually triggering it which just makes it feel laggy

@SomeoneToIgnore
Copy link
Contributor

No, sorry, I have relied on the contributor.
Will work on an update to limit this feature, thank you for the catch.

@SomeoneToIgnore
Copy link
Contributor

#47762

SomeoneToIgnore added a commit that referenced this pull request Jan 27, 2026
Follow-up of #46745

Release Notes:

- N/A
zcg pushed a commit to zcg/zedpro that referenced this pull request Jan 29, 2026
Closes zed-industries#46191

Release Notes:

- Make the auto signature popover — `"auto_signature_help": true` —
respect `hover_popover_delay`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-signature help does not respect pop-over delay setting

3 participants