Plugins: allow read-only access to user settings

Hello,
The documentation here: joplin.settings | Joplin Plugin API Documentation states

Note: Currently this API does not provide access to Joplin's built-in settings. This is by design as plugins that modify user settings could give unexpected results

Would it be possible to make access to built in settings in readonly mode?
I'm exploring some possibilities about custom actions that triggers on "onSyncComplete" and I would like to know if the client has filesystem sync enabled and where is it located.

Ultimately, I would like to implement my version of git synchronization (Feature request: Synchronising with git · Issue #3670 · laurent22/joplin · GitHub) without using file watchers and bash scripts, as a plugin. But that is for another time.

I suggest to add a "scope" parameter to joplin.settings.value(key)(joplin.settings | Joplin Plugin API Documentation) like joplin.settings.value(key, scope) with scope to be:

  1. this (default, settings of this plugin)
  2. builtin
  3. plugins (access other plugins settings, if ever)

A dedicated getter would also work for me.

Also, can joplin.settings.value(key) be renamed joplin.settings.getValue(key) to be consistent with setValue?

That's a good point, I'll add a way to read the settings in a read-only way.

Also, can joplin.settings.value(key) be renamed joplin.settings.getValue(key) to be consistent with setValue?

There are different schools on how to name getters. I like the Qt API (from which many Joplin classes and methods take their names) so that's why in general getters usually don't start with "get" in Joplin.