Open litichevskiydv opened 5 years ago
hi @litichevskiydv , maybe you enabled "editor.formatOnSave"
. to solve this problem, you can disable this option for the project (by modifying .vscode/settings.json). or you can just install clang-format and put it in the path .
@zxh0, you right, option "editor.formatOnSave"
is enabled, but it was enabled long ago and before updating VSCode I've never seen such error. I found clang-format
in the directory of the ms-vscode.cpptools
extension, for my version it is ms-vscode.cpptools-0.20.1\LLVM\bin\
, is it compatible with the extension?
Is it possible somehow to restore old behavior of the extension when it doesn't need to disable option "editor.formatOnSave"
or add clang-format
to path?
sorry for this problem : ( i will try my best to solve it in next release
@zxh0, thank you!
How can I find the clang-format install path,because I install by extention store.
How can I find the clang-format install path,because I install by extention store.
If you're using Windows, you should be able to execute
where clang-format.exe
How can I find the clang-format install path,because I install by extention store.
If you're using Windows, you should be able to execute
where clang-format.exe
what if mac?
@justlikeliuen which clang-format
Check https://formulae.brew.sh/formula/clang-format if you have homebrew installed.
You don't have to disabled anything, just install clang-format using brew install clang-format
then install clang-format
plugin for vscode
.
Indeed brew install clang-format
and installing clang-format
pluging this solves the problem for me (on a Mac), but does this mean additional installation instructions are needed somewhere?
I just noticed this same issue on Windows. My C++ plugins work fine with clang-format, but for a protobuf file, I get the exact same error message as in this bug report. I never knowingly installed clang-format, is it somehow independently integrated into the microsoft c++ plugins? For now, I will also disable editor.formatOnSave for protobuf schemas.
Hello! After each saving proto-file I see message "spawnSync clang-format ENOENT", source vscode-proto3. VSCode version: 1.29.1 ms-vscode.cpptools version: 0.20.1
Just install clang-format using homebrew. brew install clang-format It will install and set the path for clang-format.
Hello! After each saving proto-file I see message "spawnSync clang-format ENOENT", source vscode-proto3. VSCode version: 1.29.1 ms-vscode.cpptools version: 0.20.1