Reformat Document not taking into account wrap settings in .editorconfig

I might be misunderstanding how to use these settings, but I have these in my .editorconfig file to force line wrapping in my C# files before column 110:

resharper_csharp_max_line_length = 110
resharper_csharp_wrap_lines = true
resharper_keep_existing_linebreaks = false
resharper_csharp_wrap_after_declaration_lpar = true
resharper_csharp_wrap_arguments_style = chop_if_long
resharper_csharp_wrap_before_binary_opsign = true
resharper_wrap_after_declaration_lpar = true
resharper_wrap_after_invocation_lpar = true

However, the Reformat Document command never breaks my long lines. For example, lines like the following never get wrapped (there's a 4 space indent to account for too):

    protected Forum(ThrottlingWebClient webClient, CredentialManager credentialManager) : base(webClient, credentialManager)

I'm clearly using it wrong; what is the correct way to automatically wrap long lines in a consistent way with these settings?

0
2 comments

Ah never mind, I misunderstood. I was using the built in Format Document command in VS, whereas I have to use the Resharper "Apply Formatting Rules" command specifically for this.

0

Hello Fpw Uc08, I'm happy to hear that you managed to figure out what's going on.

Please feel free to contact us in case of any other questions or problems. Have a nice day!

0

Please sign in to leave a comment.