Skip to content

[Linux] Format Error #54

@Galarius

Description

@Galarius
          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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions