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

Feature Request: Group Aware Sort JSON #256

Open
hyrious opened this issue Jan 3, 2025 · 0 comments
Open

Feature Request: Group Aware Sort JSON #256

hyrious opened this issue Jan 3, 2025 · 0 comments

Comments

@hyrious
Copy link

hyrious commented Jan 3, 2025

Proposal

Like TypeScript's Group aware Organize Imports, I want to sort each group of JSON (separated by blank lines).

For example:

{
  // Workbench
  "workbench.layoutControl.enabled": false,
  "workbench.productIconTheme": "icons-carbon",

  // Other
  "cSpell.userWords": ["hyrious"],
  "window.commandCenter": false
}

Should be sorted as is, instead of moving the cSpell field to top.

Additional Info

Groups can be created inside any JSON object or array, even nested:

{
  "foo2": 1,
  "foo1": {
    "bar2": "...",

    // Group
    "bar3": "..."
  },
  "buzz": 2
}

I think it is fine to support or not to support groups at any level.

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

1 participant