F# support improvements in Rider 2017.2

Rider 2017.2 EAP builds come with a series of new features and improvements around F#, such as code folding, commenting with block commentdebugger expression evaluation on hover, support for XML docs in tooltips and more!

Many visible improvements were made, as well as “invisible” ones. For example, we’ve updated performance of parsing and working with the F# FCS – an optimization we are contributing back to the Visual F# compiler and tools so others can benefit from it, too.

Now let’s look at the more visible things!

Editing: folding, block comments, XML docs

One of the first things you will notice is that Rider now enables code folding in the editor. Pretty much any multi-line expression/statement can now be folded/unfolded at will.
F# code folding in editor

We’ve also implemented the Comment with Block Comment action (Ctrl+Shift+/ in the Visual Studio keymap), which comments out the current selection with (* and *).
Comment F# code with Block Comment

While writing code, it’s often useful to be able to look into documentation. Rider now displays XML doc comments when hovering elements that have documentation available:
Display XML documentation in Rider F# editor

Debugger: expression evaluation on hover

While debugging, Rider displays the current value of variables and watches in the Debug tool window. This latest build of Rider adds support for evaluating expressions on hover, allowing us to inspect a variable from within the editor:
F# - Evaluate expression while debugging

Other F# improvements in Rider

To improve the development flow when working in mixed C# and F# projects, Rider resolves references from C# to F# using the ReSharper code model instead of requiring projects to be (re)built. We’ve made many improvements to this system, making C# and F# interoperability fast and enjoyable. For future versions of Rider, we’ll improve this even more to enable more cross-language features.

It’s now possible to work with .NET Core F# projects, for both SDK 1.0 and 2.0. This was one of the missing features from Rider 2017.1 which is now resolved.

When an F# project uses Paket instead of NuGet, we now automatically disable our NuGet restore step when the project is loaded. This ensures that projects like Fable load properly in Rider.

Please download Rider 2017.2 EAP and give the new build a try!

Comments below can no longer be edited.

6 Responses to F# support improvements in Rider 2017.2

  1. Avatar

    Stuart Lang says:

    October 11, 2017

    It’s great to see progress being made on this, Rider is really racing ahead. Also love that you are contributing back to FSC!

  2. Avatar

    Dev says:

    October 12, 2017

    What are your plans regarding implementing an VS extension auto-converter? Will this ever be available ?

    • Avatar

      Matt Ellis says:

      October 12, 2017

      I’m not sure what you mean by “VS extension auto-converter”. Visual Studio and the IntelliJ front end have very different APIs, not to mention running on JVM vs .NET, or WPF. So, based on this, there’s no way we’d be able to get EnhancedTooltip working in Rider.

      However, we’re also aware of how useful rich tooltips are, and it is something we’d like to offer in a future version of Rider.

      • Avatar

        Dev says:

        October 12, 2017

        That makes sense, it always felt like it should be built into ReSharper.

  3. Avatar

    Vishal Anand says:

    March 11, 2018

    I have:
    JetBrains Rider 2017.3.1
    Build #RD-173.3994.2442, built on February 5, 2018
    Licensed to Rider Evaluator
    Expiration date: April 1, 2018
    JRE: 1.8.0_152-release-1024-b10 x86_64
    JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    Mac OS X 10.13.3.

    For me debugger for F# is not working.
    Any idea why? I have a default console application running .NET 4.6


    open System

    let factorial x =
    // Keep track of both x and an accumulator value (acc)
    let rec tailRecursiveFactorial x acc =
    if x <= 1 then
    tailRecursiveFactorial (x – 1) (acc * x)
    tailRecursiveFactorial x 1

    let main argv =
    Console.WriteLine(factorial 5)

Discover more