F# Visual Power Tools doesn't work

223 views Asked by At

I'm trying to work with F#. For all projects in VS2015 solution i want to have similar code style. I have installed Visual F# Power Tools and setted formatting configuration to:enter image description here

According to this configuration (space after comma) the following code:

fun unit ->Log.Information( "Found: {category}\\{name}\\{instance}",category,name,instance )

should be converted to:

fun unit ->Log.Information( "Found: {category}\\{name}\\{instance}", category, name, instance )

But when i'm trying to format documment by pressing Edit->Advanced->Format Document nothing happend.

How to format my code?

Update 1

When i try to format the code i receive Validation after formatting failed. The original content is preserved. message: enter image description here I tried to search about this problem, and found this issue. May be some one faced with such problem and know how to fix it?

1

There are 1 answers

0
Pontnou On

Try using namespaces. Below code does not format:

module Deck
type Color = 
    | Red
    | Green
    | Blue
    | Yellow

However, next one formats correctly

namespace Dummy

    module Deck = 
        type Color = 
            | Red
            | Green
            | Blue
            | Yellow