Open nguyenyou opened 1 week ago
Expectation: I think just show the value for each suggestion item is enough.
This part is up for discussion, normally we add the type and it would be an odd inconsistency not to add it. I think the actual problem is that, because of the way that type is extracted, we get it in a dealised form here.
HI @kasiaMarek,
I think it makes sense to keep things consistent. Can you change it to show the type name? Like we already have here:
If it's somehow a problem that can't be addressed at the moment, then I'm ok to live with it 😄
Can you change it to show the type name?
That would be the desirable way to show it. The problem is that I'm extracting the "expected" type from the typed tree, and in the list case it is present in the tree already dealised by the compiler. I'd have to somehow alias it back - probably doable by looking at types in the scope, or come up with a better way to deal with this. Not sure how to do it properly yet.
Please help to decide this 😄 I think this is just a nice to have improvement.
Follow up https://github.com/scalameta/metals/pull/6498
I create this issue to list all the improvements about value completions for union types.
Named args
Expectation: support value completions
Pattern matching
Expectation: support value completions
Map
Expectation: support value completions
List
Expectation: I think just show the value for each suggestion item is enough.
cc @kasiaMarek @tgodzik