-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter out some useless parameter name inlay hints #932
Conversation
…r user-provided input texts
3c654ae
to
e175323
Compare
yep! that's the 'overlap' condition mentioned in the description. |
I can't read |
I need to add test cases to show these cases explicitly, then it should become very clear by example. |
@Booksbaum with this setup in place now, if you think of good ways to expand on some of the heuristics you mentioned in the issue it should be very easy to suggest/test them. |
Will do. Filtering out short params and same param&argument probably already covers most intrusive cases. More useful suggestions probably come up, when it's in actual use (-> ionide). One enhancement I can think of: let f range = ()
let exactRange = ()
f exactRange
// ^^^^^ & type Data = {
Name: string
}
let f name = ()
let data = { Name = "..." }
f data.Name
// ^^^^ hm...I think I'm going to take a closer look over the new few days and play a bit around :) And: It's great to see the Server Test stuff in action for something else than just CodeFixes 😄 |
Fixes #924 and parts of ionide/ionide-vscode-fsharp#1693.
We apply a few heuristics to parameter name hint generation specifically now:
format
and the user provided a let binding namedformat
, do not show the hint.Additionally, we truncate all hints to 30 characters to prevent editors from chopping them up into multiple sub-hints. This is an arbitrary choice and means that we need to introduce a separate field for the text to insert for type hints, since they may be truncated.
Other heuristics that have not yet been done: