-
Notifications
You must be signed in to change notification settings - Fork 62
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
WIP: use GarishPrint for REPL output #243
base: master
Are you sure you want to change the base?
Conversation
Looks cool. Needs a dedicated doc page for it, and ideally the syntax highlighting would agree with the one you picked in OMR. |
Actually I just figured out a workaround to do this, now it respects the color scheme in OMR |
I've disabled the output overwrite function on 1.9+ and I am not so keen to put it back. For this feature, wouldn't it make sense to have a field in the REPL that allows one to give a function that overrides the standard printing or something along those lines? |
You mean a function like |
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.