resharper-fsharp
resharper-fsharp copied to clipboard
Reformat Code Ignores @formatter:off comment
Even after enabling "Turn formatter on/off with markers in code comments" (path: File | Settings | Editor | Code Style) the formatter ignores it and still formats lines that should not be changed. For example:
// @formatter:off
let a =2
becomes:
// @formatter:off
let a = 2
Hi @Phantom1472, we use Fantomas library for formatting F# code, and with it's current design it has to be implemented there first to be available in Rider.
@nojaf What do you think about supporting such markers?
Hello, this is being tracked in https://github.com/fsprojects/fantomas/issues/1704. I would like to have something in the likes of this supported.
I'm unfamiliar with the // @formatter:off
syntax, so I can't say for sure we are going for this exact thing.
The scope of what is possible might be limited to start with but the request is accepted in principle.
@nojaf This syntax comes from the default settings in Jetbrains tools:
As you can see, they also support a more general syntax (you can change these values)