WIP: use GarishPrint for REPL output #243
Open
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.
This is a draft PR since the package GarishPrint still has one day until registered. (oops, I forgot to change it to draft, I don't know how to change it after submitting a PR)
I can't think of if there is a non-hacking of doing this, since I'm not sure how to make the display get dispatched toI find a way of doing this. now if only dispatch topprint
instead ofBase.show
ifBase.show
is not overloaded for a given object, because we don't have a reflection mechanism of detecting that IIUC.pprint
whenBase.show
is not overloaded for the given object forMIME"text/plain"
orBase.show(::IO, x)
.so I just replace the default REPL multi-line print withBase.show(io::IO, ::MIME"text/plain", x)
, I think under the context of OhMyREPL this is probably fine.check the effect
The color scheme is not consistent with OhMyREPL and doesn't support changing theme in this PR yet, but GarishPrint supports changing color preference, I need to read up how OhMyREPL store the color themes first.