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

Question: vscode and JSON5 syntax highlight #256

Open
giacomorebonato opened this issue Aug 17, 2023 · 2 comments
Open

Question: vscode and JSON5 syntax highlight #256

giacomorebonato opened this issue Aug 17, 2023 · 2 comments

Comments

@giacomorebonato
Copy link

This plugin is so good that I'd like to just rely on it when using VSCode instead of using the unmaintained JSON5 extension.
To do so I associate .json5 files to JavaScript.

  "files.associations": {
    "*.json5": "javascript"
  },
  "[json5]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },

The problem that I still have is that JS validation is on because of this setting:

"javascript.validate.enable": true,

My wish is to disable this for JSON5, but not for JS files. Has anyone been in this situation before?

@giacomorebonato
Copy link
Author

giacomorebonato commented Sep 14, 2023

I opened this discussion on the JSON5 codebase: json5/json5#333
But I am not getting attention.

JSON5 could go very far if it was considered valid JS syntax by VSCode... It could for example support JSDoc or TypeScript typings (https://twitter.com/mattpocockuk/status/1696450304131092791).

VSCode maintainers suggest this should be made on the JSON5 extension, but this goes beyond my current knowledge.

Does anyone have similar views about JSON5? Or are you fine with current tooling?

@Aadv1k
Copy link

Aadv1k commented Mar 28, 2024

I would really like this to happen. Currently building a code-editor into my Web App, but it's really annoying to have the editor shout at you for using comments in JSON, even though it is being parsed in the backend as Json5

image

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

No branches or pull requests

2 participants