redhat-developer/vscode-java

Pass the function signature in the detail property of the completion item instead of the label

Open

#685 aperta il 23 ott 2018

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)TypeScript (543 fork)auto 404
content-assistenhancementhelp wantedsignature help

Metriche repository

Star
 (2295 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Based on the gif in the README and the snapshots in https://github.com/Microsoft/vscode/issues/29126#issuecomment-432262123, it looks like this extension is appending the function signature to the function name in the label of the completion item.

This makes the reading of the items hard, especially when the docs are expanded to the side (Hit Ctrl+Space to show/hide the docs once the suggest widget is open)

The CompletionItem has a property called detail. Most extensions use this property to pass the signature. Below is a typsescript example:

image

image

I understand the temptation to include the signature as part of the label. It allows the user to choose the right item from the list at a glance. But this is only possible when the function name is small and docs are collapsed. Else, it just adds noise

image

Guida contributor