vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Always Show Return Type / Signature For All Items In Suggest Widget

Open Number-3434 opened this issue 1 year ago • 4 comments

Always show return types.

This is in Dart, and is very useful.

For example, in Dart:

OPTIONS
1
1: Full signature, split between left/right

2
2: Full signature on left

3
3: Full signature on right

4
4: Abbreviated params (...), split between left/right

5
5: Abbreviated params (...) on left

6
6: Abbreviated params (...) on right

Here is the original issue in Dart:

  • https://github.com/Dart-Code/Dart-Code/issues/2462#issuecomment-1561650978

Personally, I like option 5, but would also like if there was a setting to use option 2 instead.

Number-3434 avatar Feb 13 '24 13:02 Number-3434

@Number-3434 the image link is 404'ing for me, would you mind trying to attach it again?

dibarbet avatar Feb 14 '24 19:02 dibarbet

@dibarbet Okay, I've reattached it, and given a link to the original issue in Dart.

Number-3434 avatar Feb 15 '24 07:02 Number-3434

Thanks, I can see them now. I'm open to this, but there are a few considerations. cc also @genlu

  1. We already use the right hand side text for showing namespaces in unimported type completion, so we likely can't show signatures there: image
  2. We'll have to be careful on perf here - collecting the signatures could be a bit more expensive (today we only do it during resolve)
  3. We'll have to figure out what we want to do for overloads since we can only show one signature in the list. We could pick the first, or show multiple items in the list, or something else. Not sure

Likely we could have an experience here, but some details need to be worked out.

dibarbet avatar Feb 15 '24 18:02 dibarbet

To answer your questions:

Unimported Type Completion

These could be shown as usual (i.e. override the signature).

Overloads

I have opened an issue in the VSCode repo about this:

  • https://github.com/microsoft/vscode/issues/201285

Number-3434 avatar Feb 16 '24 08:02 Number-3434