SublimeClangFormat icon indicating copy to clipboard operation
SublimeClangFormat copied to clipboard

AlignConsecutiveMacros does not work when set through Custom ST settings

Open j-rahman opened this issue 4 years ago • 1 comments

I have the same style configuration written on a .clang-format file and the clang_format_custom.sublime_settings file (modulo whatever syntactic changes are necessary). The particular line of interest is the following.

"AlignConsecutiveMacros": "Consecutive", // .clang-format has: AlignConsecutiveMacros: Consecutive

Now, when I run this by first changing Clang Format: Select Style to File, then choosing Clang Format: Format Selection, I get the correct result (most of the times): namely, the preprocessor macros of consecutive lines are aligned. However, if I change Clang Format: Select Style to Custom and then choose Clang Format: Format Selection, then the macros are all unaligned.

I am seeing this bug on two of my Fedora 32 machines using Sublime Text 4 (build 4113).

j-rahman avatar Sep 05 '21 22:09 j-rahman

If you have the PackageResourceViewer plugin in sublime, in clang_format.py add "AlignConsecutiveMacros" to all_settings.

dontblink avatar Sep 26 '22 20:09 dontblink