Stop VSCode formatting from performing specific formatting (line breaks) on save

133 views Asked by At

Has anyone had an issue in VScode where a line starting with # is broken into two lines?

I'm writing a csx dotnet-script programme and the nuget reference is defined as:

#r "nuget: YamlDotNet, 8.1.2"

But on save, that is being split into...

#
r "nuget: YamlDotNet, 8.1.2"

This didn't happen before... it's new behaviour... and it's wrong... very wrong...

Any idea what setting this might be so that I can turn it off?

1

There are 1 answers

0
ChrisAddams On

Ok, so I figured out this is coming from the "C# FixFormat" extension (V0.0.81) And there is actually a "C# FixFormat Fixed" extension (V0.0.85) which is fork from the original and doesn't seem to have this problem. I hope this might help someone... and save you an hour...