Option to restore plugin default settings

Would it be possible to add an option to reset the plugin settings to their default values?
I'm thinking of two possible options:

  1. Add an additional function like joplin.settings.restoreDefaultSettings() to the API which can be called from a plugin command.

  2. Add a button to the Plugins settings page for each installed plugin. I guess the App knows all registered settings for the plugins and also there default values.

I could implement it for the plugin myself. But I think it will be interesting for others too and could be added as a core functionality of the plugin system.


What would be the use case for it?

When users modify many settings of the plug-in, they want to quickly restore to the default settings.

I think that's a relatively dangerous option so I would rather avoid adding this. Most apps (I can't think of any actually) don't have a way to wipe out their own settings and for good reason. Perhaps what we could have is a way to restore one setting to its original value.