zokugun / vscode-sync-settings

Easily synchronize your settings
MIT License
146 stars 12 forks source link

Feature request: Allow conditionals in extensions.yml files #31

Closed binaryben closed 2 years ago

binaryben commented 2 years ago

Thanks for this project! Glad to have my settings and extensions being synced in my standard dotfiles repo!

I find myself using both VSCode and Codium at times. Some extensions are only available on one or the other (MS Remote tools), and some have mismatched IDs (eg. MJML, Theme by file). Allowing conditionals in the extensions.yml files would mean I don't have to manage seperate profiles for each.

I suspect this could be useful for OS specific extensions as well.

daiyam commented 2 years ago

Hi, I see that you are already using profiles for different languages. So adding a different set by editors will be quite difficult.

binaryben commented 2 years ago

Indeed, hence the request for conditionals similar to what is available in the settings.json files in the extension.yml files of each profile.

I'm hoping since YAML is related to JSON, it's possible. But an alternative could be to extend the YAML extension definition itself. For example:

enabled:
  - id: GitHub.codespaces
    uuid: 4023d3e5-c840-4cdd-8b54-51c77548aa3f
    editor: visual studio code
  - id: sebsojeda.vscode-apple-music
    uuid: 48c4d108-0dd6-4404-8c20-c6f62c59950c
    os: mac
daiyam commented 2 years ago

I've just finished to reply to your other issue.

So I really think you need to use attributes (https://github.com/zokugun/vscode-sync-settings/blob/master/docs/attributes.md), then you can filter by os/editor/profile. To do so, the extensions need to be manageable from the settings.json

binaryben commented 2 years ago

Closing in favour of keeping discussion in #32