-
Notifications
You must be signed in to change notification settings - Fork 790
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
Don't show parameter name hints for basic types #14548
Conversation
@@ -82,6 +82,12 @@ module InlineParameterNameHints = | |||
symbolUse.IsFromUse | |||
&& symbol.DisplayName <> "(::)" | |||
|
|||
let isTooBasic (symbol: FSharpSymbol) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be renamed to something like isBuiltinKnownType
or isBuiltinKnownSymbol
?
@@ -82,6 +82,12 @@ module InlineParameterNameHints = | |||
symbolUse.IsFromUse | |||
&& symbol.DisplayName <> "(::)" | |||
|
|||
let isTooBasic (symbol: FSharpSymbol) = | |||
let denyList = ["Some"; "Ok"; "Error"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add things like dict
, string
, set
there.
@@ -82,6 +82,12 @@ module InlineParameterNameHints = | |||
symbolUse.IsFromUse | |||
&& symbol.DisplayName <> "(::)" | |||
|
|||
let isTooBasic (symbol: FSharpSymbol) = | |||
let denyList = ["Some"; "Ok"; "Error"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be a set
. And defined on module level.
One thing which bothers me a bit is that knowledge about built-in types is leaking into editor layer. |
This seems more like it should be a feature similar to the DebuggerView in the framework. Apply an attribute to the type under consideration and have the editor notice the attribute and perform the specified formatting. The current implementation has privileged types for this type of formatting, already vlad has identified some additional types that may benefit from this. Which will cause us to have to update the editor whenever new privileged types are identified. If we create an attribute similar to debuggerviewattribute perhaps editorformatattribute then third parties will be able to provide specific formatting themselves. Anyway, I am reluctant to create an additional location for privileged types. |
Hmmm my idea was to strip just these two things as very ubiquitous and very easy to strip, before getting some feedback and coming with a more systematic approach. The one with an attribute is a viable one. |
Okay we'll do a more proper implementation, closing this for now then. |
closes #14448
Was:
Now: