Describe the solution you'd like
As originally requested in PR #106, some folks would like to be able to customize token rendering. A primary use case here is overriding how whitespace tokens are rendered, from the default in VisibleWhitespaceTokenPainter.
That PR is quite old, so rather than rebasing, we should:
Add the ability to override how an RSyntaxTextArea instance selects a TokenPainter when whitespace visibility changes (and on initial ceration)
Implement a default factory that use the built-in TokenPainters
To meet the common requirement easily, slightly refactor VisibleWhitespaceTokenPainter so it has methods thaat render spaces and tabs. That will allow clients to extend that class and just override the behavior for those tokens/parts of tokens.
Are there any workarounds?
Not without editing RSTA alibrary code.
Describe the solution you'd like As originally requested in PR #106, some folks would like to be able to customize token rendering. A primary use case here is overriding how whitespace tokens are rendered, from the default in
VisibleWhitespaceTokenPainter
.That PR is quite old, so rather than rebasing, we should:
RSyntaxTextArea
instance selects aTokenPainter
when whitespace visibility changes (and on initial ceration)TokenPainter
sVisibleWhitespaceTokenPainter
so it has methods thaat render spaces and tabs. That will allow clients to extend that class and just override the behavior for those tokens/parts of tokens.Are there any workarounds? Not without editing RSTA alibrary code.