-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comments being removed #4
Comments
Thanks for raising the issue. Currently, the extension doesn't recognise the position for single-line comments. If you have inline comments, it can keep that intact. But when we have single-line comments, there is some issue with keeping track of them. If you can help me understand what is needed, we can find a universal solution. Situations:
// JSON Langauge related settings
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
// "telemetry.enableTelemetry": false,
Problem:As this extension's only job is to sort the extensions based on certain custom orders (which I decided on and hard-coded), it was not initially designed to handle comments. Later in #2 we added the support for inline comments as it's easy to track them to individual key-value pairs. For single-line comments, as described in the above situations, it's tricky to keep track of each comment. As the extension doesn't understand the content (because it's dumb), it can't know which comment is supposed to go where.
Potential workaround:Just keep the comment as an inline comment and keep the JSON clean. As too much comment will lead to clutter. |
Before
After
The text was updated successfully, but these errors were encountered: