ClangFormat - bundled version? How to specify custom version?

已完成

I want to use a fairly new feature in clang format, specifically the BlockIndent option of AlignAfterOpenBracket:

AlignAfterOpenBracket: BlockIndent

The json schema does not recognize this value, and when I try to format it gives me an error.

How to I tell what version of ClangFormat CLion is using, and how can I specify a different version to use?

Thanks.

评论操作 固定链接

FWIW after more searching I found this issue and comment which explains the situation well. In my case the answer is probably either:
1. wait for a newer version of ClangFormat to be included in CLion
2. add a precommit hook or equivalent to run clang-format for that one option

Unfortunate, but will make do.

0

请先登录再写评论。