Hi,
I’m working on a plugin that uses view.add_regions(…, …, scope,…) to add visual information, where I would like to use a “scope” name which would not present in a standard theme file. The only way I know to make this work is to have the user of the plugin edit his/her favourite theme to add the appropriate information. I would like to do this in a more flexible way as follows:
if the scope name is defined in the theme file [1], use it, otherwise “create” such a scope programmatically - something like:
if scope_exists(scope):
view.add_regions(…, …, scope, …)
else:
view.add_regions(…, …, my_scope, …)
where my_scope is a way to assign a given foreground colour. [2]
I have no idea if it is possible to do (in a plugin) either [1] or [2] or both… but it would be really nice.
Any ideas?