Skip to content
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

unknown key "BraceWrapping" in clang_format_custom.sublime-settings (default) #53

Open
adsherman opened this issue Jan 18, 2018 · 3 comments

Comments

@adsherman
Copy link

Hi! Something about the update to solve #49 has broken my ability to format. My clang_format_custom.sublime-settings (Clang format default) reflects the update, but when I go to actually format I get the error:

Clang format: YAML:1:254: error: unknown key 'BraceWrapping'
{AlignTrailingComments: true, AllowShortLoopsOnASingleLine: true, BasedOnStyle: LLVM, ColumnLimit: 150, AllowShortIfStatementsOnASingleLine: true, AllowAllParametersOfDeclarationOnNextLine: false, BinPackArguments: false, UseTab: Never, BraceWrapping: {}, TabWidth: 4, IndentWidth: 4}
^
Error parsing -style: Invalid argument

@bdennin
Copy link

bdennin commented May 31, 2018

This can be fixed by editing the file "clang_format_custom.sublime-settings", which on Linux, is in "~/.config/sublime-text-3/Packages/ClangFormat/". There is a supported key that is not commented out, named "BraceWrapping". It is one of only two lines that are not commented. Comment this line, around line 150, and it's closing curly brace, on 156. Fixed.

@spiky27
Copy link

spiky27 commented Dec 3, 2018

This can be fixed by editing the file "clang_format_custom.sublime-settings", which on Linux, is in "~/.config/sublime-text-3/Packages/ClangFormat/". There is a supported key that is not commented out, named "BraceWrapping". It is one of only two lines that are not commented. Comment this line, around line 150, and it's closing curly brace, on 156. Fixed.

Hi,
This files doesn't exist in my linux. Although, the path to file clang_format_custom.sublime-settings is indeed "~/.config/sublime-text-3/Packages/Clang Format/" when I see it in Sublime. However I can't edit this file from within sublimetext. Do you have any workarounds?

@mrts
Copy link

mrts commented May 25, 2020

Do you have any workarounds?

Your system clang-format is old and does not support BraceWrapping. Update to latest clang-format and it will work.

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

No branches or pull requests

4 participants