ClangFormatIJ
ClangFormatIJ copied to clipboard
Not work for AppCode
cannot reformat Objective-C code. but i can reformat by clang-format command.
Do you get an error message, or silent failure? Generally speaking this should work. Have you tried re-binding the key binding?
@mprobst
no error message

Are you sure clang-format is triggering at all? The break in the middle of a keyword looks very strange, no idea how that could happen.
KelaKing [email protected] schrieb am Mi., 7. Sep. 2016 um 20:44 Uhr:
@mprobst https://github.com/mprobst no error message [image: error] https://cloud.githubusercontent.com/assets/13584044/18336375/4afda460-75b9-11e6-8935-9dca366943bd.gif
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/mprobst/ClangFormatIJ/issues/1#issuecomment-245485541, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcKLYBEOlP2KILP5AEAMKbAMxjhjK4ks5qn4SVgaJpZM4Jzg3K .
I am experiencing the same issue. ClangFormat-Xcode and command line works fine but ClangFormatIJ seems to fail. I tried both AppCode 2016.2.2 and 2016.3 EAP.
Here is the simplest example:
#import "Foo.h"
#import "Bar.h"
#import "Baz.h"
becomes
##import "Bar.h"
#import "Baz.h"
#import "Foo.h"
Note that the order of the imports is correct so clang-format definitely ran. However, it looks like there is an off-by-one error, the first # is left out and the last new line disappeared.
@KelaKing @kbtombul @mprobst
The Clang-format return wrong answer under the mac os with -output-replacements-xml key when the code uses the utf encoding. For example length of '©' symbol is equals 2.
As a temporary solution to this problem, I propose to try use the following fork: https://github.com/CheslavBochko/ClangFormatIJ
I'm happy to take pull requests on this @CheslavBochko (I'm not entirely sure I follow your fix in fork though).
same error with appcode(2017.3.3).
same error on appcode 2019.3 EAP