-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
Currently, it is not possible to do custom validation of Settings programmatically. There are some options in the Extension Manifest (package.json) e.g use a regex to validate a string. However, if you have a group of options (like a checkbox group), and you want to have at least one to be selected, this is not possible to validate. I have this scenario for my extension Marky Stats, I always want at least one stat to be selected. I can do this validation with the QuickPick, but I cannot do the equivalent with the configuration.
Currently, you can use the workspace.onDidConfigurationChange event to respond to config options being changed, but you can only tell if something has changed or not. This is done through ConfigurationChangeEvent.affectsConfiguration(). It would be great if you could update the API of ConfigurationChangeEvent to enable a change to be validated.
