CLion Code Style Forces NewLine after "using enum"

Answered

Hello,

I'm starting to get frustrated with CLion's annoying defaults on code style.
If I copy/paste a typedef or using statement, it doesn't honor the original formatting. It instead does the following:

 

using enum MipsDataType;

using
enum MipsDataType;

 

I can't find the setting anywhere for some of these settings and the preview editor for the code style is not responsive, so I can't actually test these settings out well. But, I can't find anything on the `using` or `typedef` statements and formatting.

0
2 comments

I am running into the same issue. Have you found a setting for it yet?

0

Hello!

It's a bug in CLion's built-in code formatter. I created https://youtrack.jetbrains.com/issue/CPP-33277 about that. Feel free to comment or upvote the issue. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

As a workaround, you can use ClangFormat in CLion - https://www.jetbrains.com/help/clion/clangformat-as-alternative-formatter.html

0

Please sign in to leave a comment.