Skip to content
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

The 'invalid' scope should be more obvious #68

Closed
TheIronBorn opened this issue Mar 8, 2018 · 4 comments
Closed

The 'invalid' scope should be more obvious #68

TheIronBorn opened this issue Mar 8, 2018 · 4 comments

Comments

@TheIronBorn
Copy link

TheIronBorn commented Mar 8, 2018

Currently it seems invalid only makes the text italic and doesn't change colors at all.

Most color schemes do something like: screen shot 2018-03-08 at 10 53 06 (red background, bright foreground) and I feel something closer to that would be useful.

@s-clerc
Copy link

s-clerc commented Apr 2, 2020

I’d prefer yellow and black, but I strongly agree.

@hovsater
Copy link

@Monokai would you mind taking a stab at this? Here's a concrete example:

Open a new document, set the syntax to Ocaml and enter the next 123xyz.

Using the default color scheme, Mariana, this is what we see:

Screenshot 2022-03-24 at 09 39 53

Using any Monokai Pro color scheme, this is what we see:

Screenshot 2022-03-24 at 09 41 44

The scope being used here is invalid.illegal.numeric.ocaml and I assume we want to add styling for invalid and invalid.deprecated as these are being defined by Mariana. See the snippet below:

{
  "name": "Invalid",
  "scope": "invalid",
  "foreground": "var(white2)",
  "background": "var(red)"
},
{
  "name": "Invalid deprecated",
  "scope": "invalid.deprecated",
  "foreground": "var(white2)",
  "background": "var(orange2)"
}

@hovsater
Copy link

hovsater commented Mar 24, 2022

In the meantime, anyone could customize the theme themselves to get around this by taking the following steps.

Open the Command Palette and select "UI: Customize Color Scheme". Under the rules property, add the following rules:

{
	"name": "Invalid",
	"scope": "invalid",
	"font_style": "normal",
	"foreground": "var(white)",
	"background": "var(red)"
},
{
	"name": "Invalid deprecated",
	"scope": "invalid.deprecated",
	"foreground": "var(white)",
	"background": "var(orange)"
}

@Monokai
Copy link
Owner

Monokai commented Aug 27, 2022

I've adjusted this in 1.1.21. I didn't adjust the background though, because I found that while you're typing, the partly typed code is often invalid, so you would have a lot of visual flickering.

I agree though that more prominent colors for invalid code are easier to spot when you quickly scroll through your code. So I think a red foreground color with an underline is a good compromise here.

@Monokai Monokai closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants