CLion not using .clang-format file on MacOS Monterey

Answered

I have a .clang-format file in the root directory of a project. But CLion does not use it when running under macOS Monterey (version 12.4).

3 comments
Comment actions Permalink

Hello!

Is the Enable ClangFormat checkbox enabled in Preferences | Editor | Code Style?

How did you determine that the .clang-format file isn't used?

1
Comment actions Permalink

Hi.

No, it was not enabled. For some reason, I was assuming that it was used by default. Thank you!

0
Comment actions Permalink

Actually, CLion should automatically enable ClangFormat when there is a .clang-format file under your project root (https://www.jetbrains.com/help/clion/clangformat-as-alternative-formatter.html#clion-support). But for some reason it failed to do this in your case.

I'm glad you managed to enable ClangFormat

0

Please sign in to leave a comment.