[racket] How to get paren highlighting with online compilation highlighting too?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Nov 30 11:01:03 EST 2012

This seems to work well for the basic grey and the two "shades of X" color
schemes. For the other color schemes, I've just left things as they are,
but if someone wants to figure out better colors that achieve similar
effects, that'd be welcome.

(The tricky thing is that you have to figure out what color to draw for
color N such that all of the previous colors drawn and then combined with
color N will yield the color that you really want.)

Robby

On Thursday, November 29, 2012, Robby Findler wrote:

> I think that makes sense. Indeed, I could arrange for the highlights
> to be drawn first (before the text) and use non-1 alphas to achieve
> this affect when highlights are layered. Let me think more about this
> and I'll give it a try at some point.
>
> Robby
>
> On Thu, Nov 29, 2012 at 10:04 AM, Grant Rettke <grettke at acm.org<javascript:;>>
> wrote:
> > On Thu, Nov 29, 2012 at 7:59 AM, Robby Findler
> > <robby at eecs.northwestern.edu <javascript:;>> wrote:
> >> The way those highlights work, you are going to see either one or the
> >> other and I think it gets more confusing when the paren highlights
> >> obscure the error highlights (indeed, we have had PRs in the past
> >> claiming that the error highlighting was broken when the priorities
> >> were reversed).
> >>
> >> Unless you have an idea on how to show both?
> >
> > What I was thinking was doing something like this:
> > 1. Say there is a section that is highlighted like this (foo (bar
> > (baz))) ;; (this is not complicated but imagine that it is)
> > 2. The highlighter is highlighting the whole in ERR_COLOR.
> > 3. And you need to fix something and you need to put the cursor in the
> > right place. Of course I can't reproduce the situation that made me
> > think of this hence the simple example. Anyway you want paren
> > highlighting.
> > 4. There is a some color already defined for highlighting matching
> > parens MP_COLOR. Error highlighting won't use this.
> > 5. Instead it would make MP_ERR_COLOR which is ERR_COLOR but take down
> > the value (the V in HSV I looked it up) so that it is still clearly an
> > error, but there is some visual distinction.
> >
> > Maybe this is an edge case? I can't even create a situation where this
> > makes sense.
> >
> > But anyway the idea is that it is clearly an error, but there is a
> > subtle difference to see paren background highlighting.
> >
> > Just an idea. I would code it up but it would take me a week. That
> > said I would be happy to try.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121130/bbd0673c/attachment-0001.html>

Posted on the users mailing list.