dotnet / dotnet/vscode-csharp

Autocomplete Method Signatures

Open
#6,890 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

# Proposal

Autocomplete the method signature when writing a method.

For example:

![GIF of JavaScript Method Autocompletion](https://github.com/dotnet/vscode-csharp/assets/115815794/99d689af-e406-489d-af02-a2ecfa4f304b)

This should insert a snippet that essentially matches the declaration, minus the types and default values.

Every parameter should be a **tab stop** (i.e. you can use the ⇥ Tab key to navigate to the next parameter).

    Math.Clamp(value, min, max);

value, min, and max will be **tab stops**.

I understand that this may be made difficult due to **method overloading**, I've opened an issue on the VSCode repo:
- https://github.com/microsoft/vscode/issues/201285

If this gets approved, then you will be able to choose the overload you want from the suggest widget, and then it will autocomplete it with signatures when you accept the suggestion.

However, as an initial step this should ideally apply to any method with only one overload.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.