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

Use jsonc parser for c_cpp_properties.json #5885

Closed
heartacker opened this issue Aug 3, 2020 · 1 comment
Closed

Use jsonc parser for c_cpp_properties.json #5885

heartacker opened this issue Aug 3, 2020 · 1 comment
Assignees
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@heartacker
Copy link

heartacker commented Aug 3, 2020

settings is using json with comment format,
c_cpp_p.json does not have the same bahavier as setting.json
hopes that Commas , is supported in c_cpp_p json file to make it easier for users to write configurations
otherwise, some time it is very very annoying

            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE",
                "WIN32"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "WIN32"       //using alt + uparrow/downarrow to change position, it doesn't make sense, which is very bothered
                "_UNICODE",

            ],

image

@Colengms Colengms changed the title using json with comment format file for c_cpp_p json Using jsonc parser for c_cpp_properties.json Aug 4, 2020
@Colengms Colengms added the fixed Check the Milestone for the release in which the fix is or will be available. label Aug 4, 2020
@Colengms Colengms added this to the 0.30.0 milestone Aug 4, 2020
@Colengms Colengms self-assigned this Aug 4, 2020
@Colengms Colengms changed the title Using jsonc parser for c_cpp_properties.json Use jsonc parser for c_cpp_properties.json Aug 4, 2020
@sean-mcmanus
Copy link
Contributor

This is fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders. However, comments will give squiggles unless the default JSON file type is changed to "JSON with comments", which will be fixed in our next release (see #5911 ).

sean-mcmanus added a commit that referenced this issue Aug 6, 2020
Fix c_cpp_properties.json not opening as JSON with comments. Follow up to #5885
Fix the configuration UI disappearing when selection moves to the C/C++ or Log Diagnostics window, mentioned at #5822 .
Fix an unreported bug where the configuration UI wouldn't appear for non-cpp files that are active on startup (until the selection changed).
Add more more C/C++ related files to ShowConfigurations.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants