Open
Description
It would be great to show default arguments in various places through inlay hints.
Right now, only parameter names are shown in calls:
It would definitely be great if one could also see the default arguments from declarations on the definition and use sites (comments below mark inlay hints I'm proposing to add):
void foo(int a = 10);
void foo(int a /* = 10*/) {
}
void test() {
foo(/*10*/)
}
Going a bit further, we could also consider adding inlay hints for default arguments, although they look like a harder sell to me because I expect more noise (e.g. unique_ptr
has a default deleter, vector
has an allocator and unordered_map
have hash defaults that are going to be popping up everywhere):
template <class T = int>
struct Foo {
};
Foo</*int*/> x;