Skip to content

feat: auto-trigger parameter hints when cursor enters argument list#309364

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:feat/param-hints-auto-trigger-on-cursor-252076
Open

feat: auto-trigger parameter hints when cursor enters argument list#309364
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:feat/param-hints-auto-trigger-on-cursor-252076

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Summary

Add a new setting editor.parameterHints.autoTriggerOnCursorInArgs (default false). When enabled, moving the cursor into an existing, unmatched opening parenthesis shows the parameter hints widget -- previously hints only triggered on typing ( or ,.

This solves the common case of navigating back into an existing call expression via click or arrow keys and expecting to see parameter info without deleting and retyping the (.

Implementation

  • src/vs/editor/common/config/editorOptions.ts: adds the new boolean option with schema description, default false to preserve existing behavior.
  • src/vs/editor/contrib/parameterHints/browser/parameterHintsModel.ts: on cursor change, when the option is enabled and the cursor lands inside an unmatched (, calls trigger({ triggerKind: Invoke }). Uses a same-line scan that honors '...', "...", and ... string delimiters to avoid false positives from parentheses inside string literals.

Opt-in so this does not change default behavior.

Fixes #252076

Add editor.parameterHints.autoTriggerOnCursorInArgs (default false).
When enabled, moving the cursor into an existing, unmatched opening
parenthesis shows parameter hints -- previously hints only triggered
on typing ( or ,. Uses a best-effort same-line scan that honors
single/double/backtick string delimiters.

Fixes microsoft#252076
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Auto-Trigger Parameter Hints When Cursor Enters Parentheses

2 participants