Error on :ClangFormat in Vim
pvonmoradi opened this issue · 6 comments
I installed the plugin using vim-plug. Then I invoked :ClangFormat to format my C code according to default style (google). The following error is thrown:
Error detected while processing function clang_format#replace[1]..<SNR>39_verify_co
mmand:
line 3:
clang-format is not found. check g:clang_format#command.
Error detected while processing function clang_format#replace[6]..<SNR>39_error_mes
sage:
line 1:
clang-format has failed to format.
I think you should install clang-format first, or at least confirm there is an executable file named 'clang-format' in your PATH environment variable.
Error detected while processing function clang_format#replace[6]..66_error_message:
line 1:
clang-format has failed to format.
Press ENTER or type command to continue
I have the same error , and I am sure that clang-format is installed, and its version is 5.0
I'm getting the same error
clang-format is not found. check g:clang_format#command.
Error detected while processing function clang_format#replace[6]..128_error_message:
for now I'm calling clang-format externally using :! clang-format -i *.cpp and having it mapped to a keyboard shortcut...while it works, I would really like to have the in built clang format working
Run
sudo apt-get install clang-format
and the in vim
:ClangFormat
done 👍
I've since moved to CCLS and Clangd using coc.nvim. closing the issue now.