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

Add Support for JSONC #9906

Merged
merged 4 commits into from Mar 17, 2024
Merged

Add Support for JSONC #9906

merged 4 commits into from Mar 17, 2024

Conversation

RiyeUK
Copy link
Contributor

@RiyeUK RiyeUK commented Mar 17, 2024

jsonc is currently part of the json language definition.

This currently doesn't allow for comments to be added to the JSON. It is both linted as incorrect by the language server and not highlighted correctly.

240317_14h34m34s_screenshot

The language server configured by the JSON language can take either json or jsonc as valid language ids.

Here is what the same file opened as a .jsonc looks like in this PR:

240317_14h48m44s_screenshot

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.
runtime/queries/jsonc/highlights.scm Outdated Show resolved Hide resolved
runtime/queries/jsonc/indents.scm Outdated Show resolved Hide resolved
@the-mikedavis the-mikedavis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. A-language-support Area: Support for programming/text languages labels Mar 17, 2024
the-mikedavis
the-mikedavis previously approved these changes Mar 17, 2024
@the-mikedavis
Copy link
Member

To fix the docs CI you'll need to run cargo xtask docgen and commit the changes

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 17, 2024
@pascalkuthe pascalkuthe merged commit e36774c into helix-editor:master Mar 17, 2024
6 checks passed
Desdaemon pushed a commit to Desdaemon/helix that referenced this pull request Mar 26, 2024
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
shortc pushed a commit to shortc/helix that referenced this pull request Mar 31, 2024
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 20, 2024
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants