feat: auto-trigger parameter hints when cursor enters argument list#309364
Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Open
feat: auto-trigger parameter hints when cursor enters argument list#309364yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new setting
editor.parameterHints.autoTriggerOnCursorInArgs(defaultfalse). 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, defaultfalseto 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(, callstrigger({ 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