Skip to content

Associate clang-format formatter with C and Obj-C #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dbarnett opened this issue Jan 26, 2015 · 2 comments
Closed

Associate clang-format formatter with C and Obj-C #15

dbarnett opened this issue Jan 26, 2015 · 2 comments

Comments

@dbarnett
Copy link
Contributor

In clang-format's help, it calls itself "a tool to format C/C++/Obj-C code", but the current AppliesToBuffer check on the clang-format formatter only checks for cpp, proto, and javascript filetypes.

We should enable it as a default formatter for filetypes c, objc, and objcpp so that if people use :FormatCode on these filetypes with no explicit formatter, they will get code formatted with clang-format instead of seeing Not available. codefmt doesn't have a default formatter for this buffer.

@artasparks
Copy link
Contributor

Is this a trivial change to the list of filetypes?

@dbarnett
Copy link
Contributor Author

dbarnett commented Jan 28, 2017

Yeah, I think I reported the feature request instead of implementing it directly because I wanted a sanity check that it gives good results from someone who uses C and Obj-C more, and also to ensure that enabling it by default won't cause headaches for googlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants