Draw Invisible Characters From Configuration #103
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds the ability for developers to pass in an object to determine invisible character drawing.
This is intentionally not doing the character matching and replacement styling in this package. To achieve the flexibility we want, I've raised that to the level of the source editor which can for instance determine if we want to draw a dot with larger emphasis because it's on a tab stop.
Detailed changes:
LineFragmentRenderer
. Line fragments were increasingly requiring more and more objects to be passed to them. This object centralizes those dependencies into one object.InvisibleCharactersDelegate
protocol for API consumers to conform to. Consumers can provide a set of characters to match on, and a method to provide a 'style' to draw them with.Related Issues
Checklist
Screenshots
Fleshed out example with CESE replacing tabs with arrows, spaces with dots, emphasizing a zero-width space (), and replacing newlines with the (¬) character.