Code Monkey home page Code Monkey logo

Comments (13)

klange avatar klange commented on May 23, 2024 1

I would appreciate if you can verify whether text was output at all, but I have also prepared a branch which does not include the color codes in expression evaluation output: https://github.com/kuroko-lang/kuroko/tree/uncolored

You can further disable the syntax highlighting repl input with the -r option, but note that this will also disable tab completion and automatic indentation.

from kuroko.

klange avatar klange commented on May 23, 2024 1

I think I will make the output format configurable, similar to how prompts can usually be changed (I'll support that as well).

from kuroko.

klange avatar klange commented on May 23, 2024 1

Kuroko now accepts the NO_COLOR environment variable to disable coloring the output of repr'd return values in the repl.

Additionally, rline (the rich line editing library) will accept NO_COLOR and disable themes - it still outputs ANSI escape sequences, as this is fundamental to how it works, but all of the color sequences will use "color 9", which should always set the default color. If this still isn't suitable, disabling rline with the -r flag is still an option.

from kuroko.

klange avatar klange commented on May 23, 2024

The palette in your terminal has "dark gray" set as the same color as background, which is incorrect.

https://github.com/kuroko-lang/kuroko/blob/master/src/kuroko.c#L1172

Can I disable syntax highlighting, if that is what is interfering with the dark shell theme that I'm using?

Syntax highlighting is not the cause of this, though if you are setting a custom palette as part of your shell configuration that may be responsible.

from kuroko.

klange avatar klange commented on May 23, 2024

Screenshot from 2023-08-30 05-48-54

The default theme I get in Terminator does not do this, and I checked several other palettes.

Screenshot_2023-08-30_05-51-52

When adjusting the color palette in Terminator, the lower left color here should be a gray that is distinct from the background. This is the color that is used to display expression results in the Kuroko repl.

from kuroko.

kseistrup avatar kseistrup commented on May 23, 2024

Thanks.

I'm using the Dracula theme everywhere. The gray and the background may be too similar, but they are not identical. I suspected it was something like that, but then I expected help and license to produce more than a single line of text, so I wan't sure.

It would still be nice to be able to disable the colouring and just see plain, unadorned characters in the REPL, though.

from kuroko.

klange avatar klange commented on May 23, 2024

You should be able to determine if text was actually output by selecting it (and possibly copying with Ctrl+Shift+V). Assuming your terminal is wide enough, help and license can produce a single line of output.

from kuroko.

klange avatar klange commented on May 23, 2024

I’d also like to see what happens with other strings printed using the 90 color code; seeing something like the results of print("\[[90mhello world\[[0m") would be useful.

from kuroko.

kseistrup avatar kseistrup commented on May 23, 2024

strings printed using the 90 color code

They are “invisible” in terminal emulators that are using the Dracula colour theme.

from kuroko.

kseistrup avatar kseistrup commented on May 23, 2024

This is what the “uncolored” branch looks like:

kuroko-uncoloured

This make me realise that I do not object to syntax highlighting at all, in fact I find it very useful.

I objected to some output being “invisible”, and one way of making the invisible text visible is to disable syntax highlighting.

Disabling syntax highlighting still has its merits: https://no-color.org/

Another way to improve visibility is to not make plain text output darker than text input (as on the screenshot above).

from kuroko.

klange avatar klange commented on May 23, 2024

I'll consider supporting $NO_COLOR for the repl output, alongside the improvements I mentioned previously. I had thought I had a none theme for the line editor, but I appear to be mistaken - I will add that as well. Lots of good ideas here that I should be able to get into Kuroko 1.4.1.

Meanwhile, I have tried very hard to reproduce your original issue myself, including setting up Fish and Terminator and using the Dracula theme (which I got from here: https://github.com/dracula/terminator), but I have been unable to - the gray I get is quite distinct from the background color. This is going to nerd snipe me...

Screenshot from 2023-08-30 18-22-59

Screenshot_2023-08-30_18-25-04

To help satisfy my curiosity, can you provide your Terminator config file and details on the version? I really want to get to the bottom of this - maybe there's a recent bug in Terminator or VTE to be squashed here.

from kuroko.

kseistrup avatar kseistrup commented on May 23, 2024

This is going to nerd snipe me...

No, please do not waste time on the Dracula theme. I am using the “Dracula Pro” theme, which is a tad different from the free version.

(Side note: I have, for a long time considered moving away from Dracula [Pro] to e.g. Solarized Dark. However, the palette is being used in many terminal utilities, so it's not a change that can be accomplished swiftly, and I have had enough incentive to do so just yet.)

from kuroko.

kseistrup avatar kseistrup commented on May 23, 2024

can you provide your Terminator config file

I believe that would violate the Dracula Pro TOS agreement, but perhaps I can disclose that I have in my ~/.bashrc:

printf '%b' '\e[40m' '\e[8]' # set default background to color 0 'dracula-bg'
printf '%b' '\e[37m' '\e[8]' # set default foreground to color 7 'dracula-fg'
printf '%b' '\e]P0282a36'    # redefine 'black'               as 'dracula-bg'

Color 0 is probably the offending colour.

from kuroko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.