visual-studio-codef#ionide

How to disable auto inline type comments/hints in Visual Studio Code for F#?


How to get rid of obtrusive auto hints like // Printf.TextWriterFormat... generated by VS Code:

enter image description here

I'm using Ionide plugin with the following settings.json:

{
  "FSharp.inlayHints.enabled": false,
  "FSharp.inlayHints.disableLongTooltip": true,
  "editor.inlayHints.enabled": "offUnlessPressed",
  "FSharp.inlayHints.typeAnnotations": false
}

Solution

  • It's the following:

    {
      "FSharp.lineLens.enabled": "never"
    }
    

    You may need to reload the window for it to take effect.

    If you also don't want the same information above the function definition, you also need

    {
        "FSharp.codeLenses.signature.enabled": false
    }
    

    Code lenses are shown above the relevant code; line lenses are shown in-line.