vim-clang-format icon indicating copy to clipboard operation
vim-clang-format copied to clipboard

Overriding an option from .clang-format

Open uday-cb opened this issue 4 years ago • 1 comments

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.

uday-cb avatar Jun 02 '20 12:06 uday-cb

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 =

tanmoykundu avatar Jun 02 '20 22:06 tanmoykundu