visual-studiof#type-annotation

F# automatic visible type annotations in Visual Studio


I've moved to working in Visual Studio recently (instead of VS Code) and I see that there are no automatic type annotations like in VS Code. Googling won't help to find a solution. In the attached screenshot you can see it. In the red frame you can see the automatic type annotations in VS Code. How to enable such a functionality in Visual Studio?

This is VS Code VS Code

This is Visual Studio Visual Studio


Solution

  • You need to enable these annotations: Tools | Options | Text Editor | F# | Advanced: enable applicable Inline Hints.

    Note, the change only seems to apply to new edit buffers: you'll need to reload files.

    Also note: the amount of information & detail is not the same as VS Code.