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 // comments for .json #3388

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Use // comments for .json #3388

merged 2 commits into from
Jul 30, 2024

Conversation

injust
Copy link
Contributor

@injust injust commented Jul 14, 2024

Add comments to .json files using // instead of the default #.

Even though JSON does not support comments, JSON5 and JSONC exist, so // is a much more sane default. It also improves the experience of editing micro's own config files.

@plutonium-239
Copy link

Thanks, hoping this gets merged soon

@JoeKar
Copy link
Collaborator

JoeKar commented Jul 30, 2024

From my perspective it's good to chain the default from # to // in case the comment plugin is used within json.
But the user has to keep in mind, that he can add potential issues to JSONs which aren't parsed with json5 or jsonc. Since before a # was added it's most probably not a big deal and adds at least the correct comment type for newer JSONs.

@JoeKar JoeKar merged commit b8772b6 into zyedidia:master Jul 30, 2024
@injust injust deleted the patch-1 branch July 30, 2024 21:18
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

Successfully merging this pull request may close these issues.

4 participants