microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.37k stars 28.93k forks source link

to better group/organise configs, use array `[ ]` at root level in `settings.json` #200686

Closed goyalyashpal closed 9 months ago

goyalyashpal commented 10 months ago

summaries/titles:

details:

this solution is the only one so far which:

problem addressed:

for language specific extensions, it is important to note that:

alternates considered:

the proposed one is actually inspired from the "Settings json split editor" (toggled by workbench setting "Use Split JSON" workbench.settings.useSplitJSON)

... which shows settings beauutifully like this:
```jsonc [ { "workbench.editor.languageDetection": true, // ... "workbench.localHistory.mergeWindow": 10, "workbench.startupEditor": "welcomePage" }, { "files.autoGuessEncoding": false, "files.encoding": "utf8", "files.eol": "auto", // ... "files.watcherInclude": [ ] }, { "explorer.excludeGitIgnore": false, "explorer.fileNesting.enabled": false, "explorer.fileNesting.patterns": { "package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml" } }, { "html.autoClosingTags": true, "html.autoCreateQuotes": true, "html.completion.attributeDefaultValue": "doublequotes", // ... } ] ```

Screenshots:

Footnotes:

goyalyashpal commented 10 months ago

self hiding as outdated or resolved


[^sort-json]: Options for Sort JSON richie5um2.vscode-sort-json


This is the solution mentioned in "alternates considered" i thought earlier: Predefined Top level Categorisation of settings:

  1. vanilla "core" settings[^note]:
    • editor
    • terminal
    • workbench
    • files
    • explorer
    • diffEditor
  2. other generic extension settings:
    • like those extensions which extend the "core" abilities (mentioned above)
  3. language specific settings:
    • language specific default overrides for editor settings: "[<lang>]": { ... }
    • settings of all the different extensions specific to that language only

Note:
core as in these apply independently of any file language/type,
vanilla as in without any installed extension

goyalyashpal commented 10 months ago

anyhow, i wanted to say that this problem comes often as one of contributing root causes of various issues. and there are other issues still, with which this can help in some part.

no extension controlled order (alphabetic imo doesn't work well), no extension controlled grouping (other than alphabetic proximity), and more. And since the new settings ui became the default, I've seen an uptick in users running into many issues trying to find settings. - @ eamodio at https://github.com/microsoft/vscode/issues/70589

with this proposal, the extension author can provide different groups of the settings, which users can paste in their settings.json & get a tailor made experience.

It would be nice to have a proper structure in settings.json - @ SharakPL at https://github.com/microsoft/vscode/issues/199658

This can make it easier for us to organize Java settings by feature categories rather than by extensions. - @ testforstephen at https://github.com/microsoft/vscode/issues/198081

this proposal can help with above situation in 2 ways:

vscodenpa commented 9 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa commented 9 months ago

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!