Simplify API for updating settings #54183
Labels
api
config
VS Code configuration, set up issues
feature-request
Request for new features or functionality
*out-of-scope
Posted issue is not in scope of VS Code
Milestone
Today the API for modifying settings supports to target the different settings stores (user, workspace, folder). This is powerful but a bit laborious to use.
If you need to update a value in the store where it came from, you need to write code to figure out where it came from and then select the appropriate target value for passing it to
WorkspaceConfiguration.update
.This results in something like this:
I suggest that we simplify the API a bit.
Currently I see two approaches:
originalTarget
to theConfigurationTarget
type. With this a setting value can be toggled like this:effectiveTarget
to the structure returned fromWorkspaceConfiguration.inspect
.effectiveTarget
would contain the target where the value came from. With this a setting value can be toggled like this:The text was updated successfully, but these errors were encountered: