-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Description
Problem
Signature help providers sometimes need more information to determine which signature to return. microsoft/TypeScript#1150 for example discusses how typing a comma inside of a string could mistakenly triggering TypeScript signature help. Using the current VS Code api, a signature help provider cannot easily distinguish the cases:
- User just typed a comma in a string, triggering signature help.
- Cursor is after a comma in a string and the user manually requested signature help.
Proposal
Add a context
when requesting signature help. This context should supply at least the following:
- The character that triggered signature help (optional)
- Why signature help was triggered (manual, typing, retrigger, ...)
This proposal is based on what typescript has implemented which in turn is based on rosyln
retriggger
presents one additional complication. This is needed for nested function calls and would be invoked when you type a closing brace with signature help already showing, such as:
console.log(1, Math.max(1, 2)| )
when the user has just typed )
. See Daniel's comment for more context: microsoft/TypeScript#1150 (comment)