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
Option to change behaviour when no .clang-format is found #94
Comments
Sure we could look into that. Why not just configure it, though? Add a |
Hi Tony, I am using the method of having a Somewhat related, the plugin will show the message for system headers you accidentally try and save - they won't pickup your I was thinking of adding this myself when I had time. Glad to have feedback |
Go for it! Contributions are always welcome — I think my concern here is that users installing the plugin expect it to do something (anything) when they run it on first install — even if it's not correct. Format on save isn't enabled by default, is it? It seems to me that a change like this might disadvantage new users. |
you can check the .clang-format file into the root of your project's git repo and then everyone would automatically have it. |
@travisjeffery I think @Ashton-W is concerned about users who install the plugin then go to edit another project (outside of his control) without a configuration file. They'll see the error mentioned. |
sure. seemed he was mostly concerned about the projects his team was working on ^. supposedly they'd be the same projects. ¯_(ツ)_/¯ i'm -1 on making no formatting the default too. i think that would just confuse a lot of people that it wasn't working. just disable the plugin if you're working on another project/don't want to use it. |
I was thinking this would be another option under 'format on save', so only projects with a |
i don't many would want it use llvm as is either, but a lot people don't want the default color scheme in vim as their color scheme as the default. neither do they want the default cover photo on fb/twitter as their cover photo but it lets them know it's there and working and that they can change it. i simply don't want to add a piece of configuration needed for people to start formatting and see that it's working. either way they'll probably configure it anyway but at least this way the default shows that it's working. best case clang would support an option that would disable formatting. maybe there is one but i think their docs are down currently. |
I think we agree that we shouldn't change the default behaviour. Instead add something users can opt-in to. This would be the same as creating |
I dislike the default behaviour of
clang-format
, in that if there is no configuration it defaults to formatting with LLVM style. This is annoying if you use 'format on save', this message is also shown: "Can't find usable .clang-format, using LLVM style".Can we get an option to default to no-format if no config is found?
The text was updated successfully, but these errors were encountered: