Depends on the setting, some are available in editor.h and document.h headers in the API. Others may not have been exported. Reading the keyfile is not reliable, Geany can write it at any point and AFAICT there is no signal to notify plugins. And don't forget some settings are overridden by the project file.
Better to ask for the setting to be added to the API.
To summarise, if its not in [here](https://www.geany.org/manual/reference/) plugins should not use it, even if they can.