Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat Code Ignores @formatter:off comment #332

Open
user9517 opened this issue Dec 29, 2021 · 3 comments
Open

Reformat Code Ignores @formatter:off comment #332

user9517 opened this issue Dec 29, 2021 · 3 comments

Comments

@user9517
Copy link

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
@auduchinok
Copy link
Collaborator

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?

@nojaf
Copy link
Contributor

nojaf commented Jan 17, 2022

Hello, this is being tracked in fsprojects/fantomas#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.

@user9517
Copy link
Author

@nojaf This syntax comes from the default settings in Jetbrains tools:
image

As you can see, they also support a more general syntax (you can change these values)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants