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

API Feature Request: Fetch configuration default value #13948

Closed
Jakobud opened this issue Oct 18, 2016 · 1 comment
Closed

API Feature Request: Fetch configuration default value #13948

Jakobud opened this issue Oct 18, 2016 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality

Comments

@Jakobud
Copy link

Jakobud commented Oct 18, 2016

You know how you have your Default Settings file and then your own User Settings file? Whenever you use the API to get configuration values, it pulls it from the User Settings file if it exists there, otherwise it falls back to the Default Settings file.

It would be nice to have the option to specifically pull configuration values from the Default Settings file. The reason is this:

Lets say you have a configuration value that is meant to be a boolean. Some sort of true/false value for your extension. And then someone copies this configuration value over to their User Settings file but they accidentally change it to a string instead of a boolean.

Now in your extension code, you need to obviously do a type check on the fetch configuration value to make sure it's a boolean. If it's not a boolean, you should probably fall back to the default value. But there is no way to fetch the default configuration value from the Default Settings. The only solution for this is to also hardcode your default value within your code and grab it from there.

I can't see a way to grab default values from configuration, so it would be really nice to have this option. Thanks,

@roblourens roblourens added the feature-request Request for new features or functionality label Oct 18, 2016
@dbaeumer dbaeumer assigned jrieken and unassigned dbaeumer Oct 25, 2016
@jrieken
Copy link
Member

jrieken commented Oct 25, 2016

closing this as a duplicate of #10583 which is about exposing the default, user, and workspace-level values of each setting

@jrieken jrieken closed this as completed Oct 25, 2016
@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 25, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants