问题
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:
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:
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:
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
来源:https://stackoverflow.com/questions/41201311/f-visual-power-tools-doesnt-work