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

Overriding an option from .clang-format #109

Open
uday-cb opened this issue Jun 2, 2020 · 1 comment
Open

Overriding an option from .clang-format #109

uday-cb opened this issue Jun 2, 2020 · 1 comment

Comments

@uday-cb
Copy link

uday-cb commented Jun 2, 2020

Hi all,

Is there a way to specify an option that overrides the one found in .clang-format in the directory tree? I notice the let g:clang_format#style_options = { variable, but it isn't clear if specifying options there is additive to the ones found in .clang-format or a replacement, and if it's the former, as to which one overwrites the other. This perhaps depends on the behavior of clang-format itself but could this be clarified under https://github.com/rhysd/vim-clang-format#customization ?
Thanks.

@tanmoykundu
Copy link

I am having the same trouble. I have different .clang-format in my different projects and I wanted to overwrite the .clang-format from the parent directory of the open buffer.
I have tried using with and without the following options as well as copying my style option individually, but somehow its not overriding.

let g:clang_format#code_style='google'
let g:clang_format#detect_style_file = 1
let g:clang_format#style_options =

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

2 participants