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

Unable to set value for IncludeCategories #84

Open
opeik opened this issue Apr 11, 2019 · 2 comments
Open

Unable to set value for IncludeCategories #84

opeik opened this issue Apr 11, 2019 · 2 comments

Comments

@opeik
Copy link

opeik commented Apr 11, 2019

I can't find any documentation on how to set a value like IncludeCategories. I've tried the following:

'IncludeCategories' : ["Regex: '^<.*\>'", "Priority: 1", "Regex: '.*'", "Priority: 2"]

Any help would be appreciated.

@Ronnie-Lon
Copy link

I can't find any documentation on how to set a value like IncludeCategories. I've tried the following:

'IncludeCategories' : ["Regex: '^<.*\>'", "Priority: 1", "Regex: '.*'", "Priority: 2"]

Any help would be appreciated.
it works for me
let g:clang_format#style_options = {
\ "BraceWrapping" : {"AfterClass":"true", "AfterControlStatement":"false", "AfterEnum":"true", "AfterFunction":"true", "AfterNamespace":"false", "AfterStruct":"true", "AfterUnion":"true", "BeforeCatch":"false", "BeforeElse":"false"},
\ "IncludeCategories" : [{"Regex":"^<..h>", "Priority":1},{"Regex":"^<.>", "Priority":20},{"Regex":".*", "Priority":3}],
\ "AccessModifierOffset" : -4,
...}

@rhysd
Copy link
Owner

rhysd commented Oct 10, 2019

I'm not sure, but at least the \ does not work because it is in string literal. It should be double-escaped as "Regex: '^<.*\\>'" then it would be interpreted as Regex: '^<.*\>' correctly

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

3 participants