Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-format.executable in settings.json does not work with vscode 1.63.2 #128

Open
maestudillo opened this issue Dec 27, 2021 · 1 comment

Comments

@maestudillo
Copy link

Hi all,

I am trying to set clang-format.executable in settings.json to look for clang-format executable path, but it does not work.

My current vscode version is 1.63.2

Is there any way to configure in settings.json a relative path to the project where it is clang format executable?

Thanks in advance

@colin-grant-work
Copy link

colin-grant-work commented Dec 16, 2022

One point of interest here is that the configuration specification for the clang-format.executable preferences in this repo is incorrect. Although preferences in settings.json are keyed on long, .-separated strings, internally VSCode turns them into an object tree. That means that VSCode can't / won't handle a.b with a value and a.b.* with a value, so this is impossible:

"clang-format.executable": {
"type": "string",
"default": "clang-format",
"description": "clang-format executable path"
},
"clang-format.executable.windows": {
"type": "string",
"default": "",
"description": "clang-format executable path on Windows"
},
"clang-format.executable.linux": {
"type": "string",
"default": "",
"description": "clang-format executable path on Linux"
},
"clang-format.executable.osx": {
"type": "string",
"default": "",
"description": "clang-format executable path on macOS"
},

It appears that VSCode is accepting clang-format.executable and ignoring clang-format.executable.* - they don't appear in the settings UI, and they don't appear in the schema used for the settings.json file:

image

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants