Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable Token painting #534

Closed
bobbylight opened this issue Feb 17, 2024 · 0 comments
Closed

Customizable Token painting #534

bobbylight opened this issue Feb 17, 2024 · 0 comments
Assignees
Milestone

Comments

@bobbylight
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant