[Linux] Format Error
Galarius opened this issue · 0 comments
Galarius commented
Hi, I have a problem when running on Ubuntu, I've tried setting the absolute path to the formatter:
"OpenCL.formatting.name": "/home/<my username>/.vscode/extensions/ms-vscode.cpptools-1.14.5-linux-x64/LLVM/bin/clang-format"
However whenever I try to format a .cl file, I get this popup:
[OpenCL Formatter] Failed to format document. Check the console in dev tools to find errors when formatting.
And when I go to Output -> Extension Host I see
2023-03-31 12:21:28.793 [error] [galarius.vscode-opencl] provider FAILED
2023-03-31 12:21:28.793 [error] undefined
What works for me is installing clang-format directly with sudo apt install clang-format
and then setting the path to its binary
"OpenCL.formatting.name": "/usr/bin/clang-format"
Originally posted by @geeshta in #49 (comment)