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 proper JSONC grammar #7255

Merged
merged 3 commits into from
Feb 23, 2025
Merged

Use proper JSONC grammar #7255

merged 3 commits into from
Feb 23, 2025

Conversation

DecimalTurn
Copy link
Contributor

@DecimalTurn DecimalTurn commented Feb 22, 2025

Description

At the moment, the Javascript grammar is used for JSONC (JSON with comments). This is not ideal since it makes the keys have the same highlighting as strings making it less pleasant to read:

image

Looking at the official grammar used by VS Code, we get a nicer experience:

image

This PR changes the grammar to use the official VS Code grammar for JSONC. However, to avoid adding the whole VS Code repo as a submodule, I've used a "mirror" repo that remains synced with the official version.

Checklist:

@DecimalTurn DecimalTurn requested a review from a team as a code owner February 22, 2025 18:06
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Important

The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.

@lildude lildude added this pull request to the merge queue Feb 23, 2025
Merged via the queue into github-linguist:main with commit 9cafe12 Feb 23, 2025
5 checks passed
@DecimalTurn DecimalTurn deleted the jsonc2 branch February 23, 2025 13:57
@DecimalTurn DecimalTurn mentioned this pull request Feb 23, 2025
4 tasks
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.

2 participants