Open b0o opened 1 week ago
That's a great idea! There's nothing blocking us from doing this:
Add a renderer.decorators
option, which would take a table of the user's decorator class.
Instantiate them with highest priority.
Make the Decorator
abstract class user friendly, with documentation on what must be implemented etc.
Add help entries that just direct to the Decorator
class documentation which is the one and only source of truth.
Add DecoratorQuickfix
recipe.
Safer approach:
Create a UserDecorator
class, exposed and documented via a new API function, say, api.appearance.decorator.add
.
This class will be similar to Decorator
however:
I would love to have an API for defining custom decorators. My use case is to add an icon/highlight for nodes which are in the quickfix list. I've come up with a hacky way to accomplish this, by overriding the bookmarks decorator:
It would be nice if there was an official way to do this.