-
Notifications
You must be signed in to change notification settings - Fork 1
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
.clang-format is used instead of .unibeautifyrc #29
Comments
Can you share what your |
Sure :)
|
Actually nothing from There are a lot of options for clang-format and we didn't have the time to go through them, add to Unibeautify, and transform them. |
Aha, sorry I didn't read the code more thoroughly :) No wonder. Yeah, it probably has more options than anything else. I couldn't find anything about |
Yep that's what prefer_beautifier_config does. Sorry it had underscores. |
@lassik Please see https://unibeautify.com/docs/beautifier-clangformat for documentation related to ClangFormat. In the For details about the @szeck87 I think we should start including a link to the Website Docs in the repositories' Also, we Unibeautify editor extensions should display warnings when unsupported options are used for languages. Such as |
Thank you for the pointers and sorry to raise ignorant concerns. I recalled from some earlier issue that the plan was to always use Unibeautify's unified formatting options instead of beautifiers' native options, so I didn't think to look for a
Excellent suggestion. Could we make the CLI handle this? (Related discussion in Unibeautify/cli#42)
Good idea. The documentation seems well written :) From just my point of view, I would clarify the following terminology to make it easier for newbies to understand:
Perhaps only talk about "language options" and "beautifier options"? But this is minor. Also, I had no idea |
You are absolutely correct 😃 . The objective is for all configuration to be unified by Unibeautify's options. Unfortunately, we often have 2 problems:
Our current workaround is to allow users to use existing configuration files. This allows us to support advanced configuration for specific beautifiers along with making the onboarding process easier for those already using these beautifiers and new to Unibeautify. For example, there may be tools in the future to convert from
See https://unibeautify.com/docs/beautifier-clangformat.html#advanced : You're right. These headers should be @lassik Please feel free to make changes to https://github.com/Unibeautify/website . It is a work in progress and definitely could use clarify and improvements from newcomers. Thanks in advance! 😃 |
Awesome to hear 😄
Happy to hear about this. Sounds like the best approach to me too. I'll see if I can find the time to go over the website. Thanks for soliciting feedback :) |
|
With the current version from NPM (
@unibeautify/[email protected]
), the external programclang-format
gets its settings from a file named.clang-format
in the current directory, just as it does when it runs standalone.I think
.unibeautifyrc
is also ignored altogether. I did a quick test with a.unibeautifyrc
in the same directory astest.c
(an example file to format) and it ignored.unibeautifyrc
even when there is no.clang-format
file in the directory.This code: https://github.com/Unibeautify/beautifier-clang-format/blob/master/src/index.ts#L136
seems to fallback to
-style=file
as a default. I believe we should never use-style=file
or.clang-format
with Unibeautify - @Glavin001 I recall you talked about this in some GitHub issue under some project, giving reasons?EDIT: Just to recap, here's the
-style=
part ofclang-format --help
:The text was updated successfully, but these errors were encountered: