fisheva / Eva-Theme

A comfortable and semantic theme.
https://marketplace.visualstudio.com/items?itemName=fisheva.eva-theme
MIT License
452 stars 38 forks source link

Could you give Booleans Other Color than For, if, Else and C Directives? (They are All the Same Color, #CF68E1) #38

Closed REYNEP closed 3 years ago

REYNEP commented 3 years ago

Booleans (true, false, Void) are the same color as Flow Controls (For, If, Else, <=, !=, ||) and Directives (#include, #ifdef, Also Directive Functions)....

Wouldn't It be better if they had separate Colors For Themselves? ๐Ÿ™‚

fisheva commented 3 years ago

Good question!

First, I deliberately made <= != || the same color as Booleans, since I thought the result of these judgments is a boolean value at last.

However the same color for other keywords is a helpless action. At the beginning of the theme, I also imagined that the characters of each meaning were set in different colors. But finally, I found that the programming characters have too many meanings and the colors are not enough. Therefore, some characters with different meanings have to share the same color, as long as they do not appear continuously in the code, it is not easy to cause confusion.

Adding a new text color to the theme is not an easy task. The character color must meet the following points:

When I browse the web, I often pay attention to some good-looking colors. Whenever I find one, I try it in Eva Theme, but most of them were eliminated under the restrictions of the first two. Colors that meet the above three rules are absorbed into Eva Theme, which makes Eva Theme what it looks like today.

REYNEP commented 3 years ago

[OffTopic/AnotherTopic] I was Wondering if you would Make things Like "uint8_t" italic and/or same color as int, float.... ๐Ÿ˜ƒ

fisheva commented 3 years ago

When int appears as a defining word, it displays purple; when it appears as a data type, it displays pink. image

unit8_t is a color that has not been set before, and it is displayed in gray. I just went to check its definition and added a setting to it, it is classified as a data type, displayed in pink. Thanks for reminding! Please update your Eva Theme version.

REYNEP commented 3 years ago

Thank You, Now it Looks Better....๐Ÿ˜„ But There is One More Thing Left.... I think The Picture will Help... (int, float and things like that looks Purple At most places)

Code_3gUDgEO4a0

Although, If I write "int x" as a function Argument/Parameter Like you, then "int" becomes pink

fisheva commented 3 years ago

I got what you mean. You mean the 2 pink uint8_t in the picture should be purple. But the scope value of uint8_t in the two places in the picture is no different from the uint8_t value appearing elsewhere. image image

If change it, uint8_t is all purple. I am not familiar with the C language. I want to hear your opinion. Do you think the meaning of uint8_t is more toward the definition word (purple) or more toward the data type (pink)?

REYNEP commented 3 years ago

I Like It This Way, Where Builtin Primitive Types Like int, float, double, bool are Purple but Other Non-Primitive but (still Built-in) uint8_t, uint16_t are Pink.... ๐Ÿ˜„

But many people Would Disagree with me and say, those should Look the same color. Many Other Themes Like the Default VS Code Theme has the Same color for all of those.

It's Like even in _typedef long long int uint64_t_, here all word would be same color in most of the Themes (Except for typedef, obviously) [Which in My Experience Looks Horrible]

_uint8t is a Data Type (in the Standard C Library _stdint.h, typedef unsigned char uint8_t_ is used to Define it) So It's More Towards a Data Type rather than Definition Word....**

fisheva commented 3 years ago

The question is, the Scope values โ€‹โ€‹of uint8_t currently seen are all "storage.type.built-in.c (pink)", no "storage.type.built-in. primitive.c (purple)". Vscode does not distinguish between them in different positions in the code, like int, so currently, it can only be set to this, all pink.

All theme plugins add color to characters based on its scope value. You can check the scope value of all characters by pressing "Ctrl+Shift+P" (Windows) or "Cmd+Shift+P" (Mac) and selecting "Inspect TM Scopes".

REYNEP commented 3 years ago

I know that.... That's What I Tried To Say at the First Line.... ๐Ÿ˜… (+ As I have Mentioned earlier, I Like Them with Different Colors)

I Like It This Way, Where Builtin Primitive Types Like int, float, double, bool are Purple but Other Non-Primitive but (still Built-in) uint8_t, uint16_t are Pink.... ๐Ÿ˜„

Builtin Primitive Types Refers to storage.types.built-in.primitive.c and Non-Primitive but (still Built-in) refers to storage.types.built-in.c