ClangFormatIJ icon indicating copy to clipboard operation
ClangFormatIJ copied to clipboard

Not work for AppCode

Open KelaKing opened this issue 9 years ago • 8 comments

cannot reformat Objective-C code. but i can reformat by clang-format command.

KelaKing avatar Sep 02 '16 09:09 KelaKing

Do you get an error message, or silent failure? Generally speaking this should work. Have you tried re-binding the key binding?

mprobst avatar Sep 02 '16 15:09 mprobst

@mprobst no error message error

KelaKing avatar Sep 08 '16 03:09 KelaKing

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 .

mprobst avatar Sep 08 '16 03:09 mprobst

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.

kbtombul avatar Oct 01 '16 00:10 kbtombul

@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

ghost avatar Mar 10 '17 00:03 ghost

I'm happy to take pull requests on this @CheslavBochko (I'm not entirely sure I follow your fix in fork though).

mprobst avatar Mar 10 '17 07:03 mprobst

same error with appcode(2017.3.3).

0x11901 avatar Apr 10 '18 15:04 0x11901

same error on appcode 2019.3 EAP

MeGaPk avatar Oct 14 '19 10:10 MeGaPk