vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Configurable C_cpp_properties.json Location

Open hacantorcooke opened this issue 1 year ago • 3 comments

Feature Request

Allow a workspace setting to point to the c_cpp_properties.json rather than requiring it to always live in the root of the folder. Or allow the entire c_cpp_properties.json to be embedded in the workspace JSON

Maybe this is already possible and I missed it?

hacantorcooke avatar Jul 22 '24 19:07 hacantorcooke

@hacantorcooke We have C_Cpp.default.* settings that correspond to the properties in c_cpp_properties.json -- is using those sufficient for you?

sean-mcmanus avatar Jul 24 '24 23:07 sean-mcmanus

@sean-mcmanus Default settings don't include configurations so doesn't work for me. Basically looking for a way to get configurations to be specific to the workspace (or let the workspace point to the configurations).

Letting it live in the workspace JSON also works.

I see there's "configurationProvider" which could maybe work if it could be told to point to a JSON with the configs? It seems like it has to be an extension currently.

Basically, this is what's in my C_cpp_properties.json. Would like to make it so that this information doesn't have to be in the root of the open folder image

hacantorcooke avatar Jul 25 '24 13:07 hacantorcooke

Hey @sean-mcmanus, this issue might need further attention.

@hacantorcooke, you can help us out by closing this issue if the problem no longer exists, or adding more information.

github-actions[bot] avatar Aug 25 '24 11:08 github-actions[bot]

This issue has been closed because it needs more information and has not had recent activity.

github-actions[bot] avatar Sep 25 '24 11:09 github-actions[bot]

We work on a team, and it would be extremely helpful to have workspace information follow the workspace, instead of each developer having to individually setup their include paths, compilers, etc. When you have 20 projects, with different compilers and configurations, it's a real problem keeping everything working well.

There seems to be a lot of resistance to this, but I don't really understand why.

I'm not sure how the C_Cpp.default.* file would help. Perhaps a lot of us just don't understand how it's intended to be used?

EDIT: I figured it out. Misunderstanding on my part about how this feature works. Pretty much, what you've implemented does what we need it to do. It's just not immediately obvious from the documentation how it's meant to be used when you don't spend a lot of time fiddling with the settings, etc.

Thanks!

johndv7 avatar Sep 30 '24 14:09 johndv7