Implement per-workspace C/C++ configurations (#14363)#14366
Implement per-workspace C/C++ configurations (#14363)#14366Subham-KRLX wants to merge 4 commits intomicrosoft:mainfrom
Conversation
| "configurations": [ | ||
| { | ||
| "name": "(gdb) Launch", | ||
| "preLaunchTask": "build", |
There was a problem hiding this comment.
@Subham-KRLX Can you revert the Code Samples folder changes?
| const readResults: string = fs.readFileSync(this.propertiesFile.fsPath, 'utf8'); | ||
| if (readResults === "") { | ||
| return false; // Repros randomly when the file is initially created. The parse will get called again after the file is written. | ||
|
|
There was a problem hiding this comment.
There's a "try" removed above, but the catch doesn't appear to be removed. That seems to cause a bunch of compiler errors.
| }, | ||
| "C_Cpp.configurations": { | ||
| "type": "array", | ||
| "description": "A list of configurations that will be used instead of c_cpp_properties.json when present in workspace settings.", |
There was a problem hiding this comment.
Can you reference localizable strings, e.g. %c_cpp.configuration.default.recursiveIncludes.order.markdownDescription% in package.nls.json? Or did you want us to do that?
sean-mcmanus
left a comment
There was a problem hiding this comment.
After feedback from Bob, this PR appears unnecessary, and the current design is sufficient via using additional configurations with different names corresponding to which workspace is being used.
|
how |
@heartacker What are you asking exactly? I added a longer comment in the original issue. |
This PR introduces the
C_Cpp.configurationssetting, allowing users to define C/C++ configurations directly within VS Code workspace or folder settings. This resolves #14363, where multiple workspaces sharing the same folder were forced to share a singlec_cpp_properties.jsonfile.Key Changes
C_Cpp.configurationsfrom settings over the localc_cpp_properties.jsonfile.${workspaceFolder}), and sanitization logic as the traditional file-based approach.onDidChangeSettingsto ensure IntelliSense/Status Bar UI updates immediately when settings are modified.Verification
c_cpp_properties.json.Fixes #14363