sbdchd / neoformat

:sparkles: A (Neo)vim plugin for formatting code.
BSD 2-Clause "Simplified" License
1.98k stars 189 forks source link

.clang-format file is ignored when style is specified to file #476

Open Stewil opened 1 year ago

Stewil commented 1 year ago

Hello, I stumbled on some unexpected behaviour. As per an old issue (#8 ) response, I put the following in my init.vim:

let g:neoformat_cpp_clangformat = {
            \ 'exe': 'clang-format',
            \ 'args': ['-style=file'],
            \ }

which resultet in the behaviour that my .clang-format file was completely ignored. However, removing the entire block and only leaving let g:neoformat_enabled_cpp = ['clangformat'] as the sole configuration of neoformat in the init.vim file resulted in the expected behaviour of the .clang-format file being read.

I assume this is a bug, as the same arg given on the commandline results in .clang-format being used