travisjeffery / ClangFormat-Xcode

Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
https://twitter.com/travisjeffery
MIT License
2.89k stars 288 forks source link

Exclude Files from 'Format on Save' #12

Closed winkelsdorf closed 10 years ago

winkelsdorf commented 10 years ago

As a feature request:

It would be nice to be able to define a list of excluded file extensions for Format on Save. Editing a raw .plist or a podfile is a pain with the Format on Save enabled. Otherwise the Format on Save does a great job but I tend to forget about when quickly making changes in raw files.

Or a whitelist? Just parse .h/.m/.c files when using Format on Save?

Cheers, Frederik

fabiopelosin commented 10 years ago

:+1:

flegallo commented 10 years ago

:+1:

ignazioc commented 10 years ago

:+1: At lease, is is possible to limit the reformat process to source files only? (.h/.m/.mm) and not xml, plist, json ? In addition, with very large xml files the formattin process stucks.

travisjeffery commented 10 years ago

done

ignazioc commented 10 years ago

nice! I've tested it ans works fine, but only for explicit format command. If you enable the "format on save" options, all files are formatted.