Showing inline parameter hints on Visual Studio Code
What are inline parameter hints?
When using a literal in a method call, some IDEs have the capability to annotate those with the name of the parameter. This makes it much easier to understand what their value represents.
Some IDEs from JetBrains have this functionality enabled by default:
- Android Studio
- IntelliJ
- PyCharm
- Storm
- ReSharper (Visual Studio plugin for .NET projects)
There are also other IDEs that support this inline hint feature like Eclipse and NetBeans.
One place where inline parameter hints become particularly useful, is when passing in null
values or booleans. What do the null
and false
arguments represent here?
The meaning of these becomes clear immediately when using inline parameter hints, without having to rely on using named arguments for readability:
This feature can be enabled on Visual Studio Code by installing extensions.
To access this feature, you will need to search for inline parameter on VS Code Extensions Pane:
Unfortunately, most of the inline parameter hints extensions on VS Code are for JavaScript, TypeScript, PHP or Lua.
Reference:
Inline parameter name hints for C# and VB.NET in ReSharper and Rider
https://marketplace.visualstudio.com/items?itemName=liamhammett.inline-parameters