fisheva / Eva-Theme

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

Input colorization looks wrong, alongside with many others #89

Closed rababR1 closed 7 months ago

rababR1 commented 1 year ago

Screenshot

image

Code Snippet

def termGate():
    os.system("clear")
    printt("After going through several gruelling hours dealing with airport security, you finally make way to the terminal.\n", userStrDelay)
    time.sleep(0.5)
    printt("You check your watch.\n\n"+fg(110)+" The time is 7:30 am." +
           attr(0)+fg(30)+"\n\nAnd your flight is @ 8:20 am\n\n"+attr(0), userStrDelay)
    time.sleep(0.5)
    printt("OK....\n\n", userStrDelay)
    rprint("[underline chartreuse1] YAY! ENOUGH TIME! \n\n")
    printt("1. Shop at the duty free store\n", userStrDelay)
    printt("2. Get to your gate\n", userStrDelay)
    printt("3. Take a nap\n", userStrDelay)
    decision = int(input("So.... What do you want to do? 🤔\n\n"))

Supplement

image I have this enabled for semantic highlighting.

However, when I set this to "true": the input is colorized:

image image

My settings for C_Cpp: Enhanced Colorization:

image

Edit: I also noticed in version 1.9.2, when you leave VSCode Insiders(v 1.75) on for a long time, with these settings (setting semantic highlighting to "true" and C_Cpp: Enhanced Colorization is enabled), the colors get worser:

image

Whereas in VSCode (v 1.74, not the Insiders build!), it displays fine....

image

I believe its an issue with my theme, or my Insiders build. Did a clean reinstall (because I had about 2500+ extensions), and nothing was fixed. In fact, I made several issues on the VSCode repository about some task error warnings showing up because I didn't install "cppbuild". I installed it using npm install cppbuild, and the error message did not show up.

Code snippet 2:

import os

import numpy as np

screen_size = 30
theta_spacing = 0.07
phi_spacing = 0.02
illumination = np.fromiter(".,-~:;=!*#$@", dtype="<U1")

A = 1
B = 1
R1 = 1
R2 = 2
K2 = 5
K1 = screen_size * K2 * 3 / (8 * (R1 + R2))

def render_frame(A: float, B: float) -> np.ndarray:
    """
    Returns a frame of the spinning 3D donut.
    Based on the pseudocode from: https://www.a1k0n.net/2011/07/20/donut-math.html
    """
    cos_A = np.cos(A)
    sin_A = np.sin(A)
    cos_B = np.cos(B)
    sin_B = np.sin(B)

    output = np.full((screen_size, screen_size), " ")  # (40, 40)
    zbuffer = np.zeros((screen_size, screen_size))  # (40, 40)

    cos_phi = np.cos(phi := np.arange(0, 2 * np.pi, phi_spacing))  # (315,)
    sin_phi = np.sin(phi)  # (315,)
    cos_theta = np.cos(theta := np.arange(
        0, 2 * np.pi, theta_spacing))  # (90,)
    sin_theta = np.sin(theta)  # (90,)
    circle_x = R2 + R1 * cos_theta  # (90,)
    circle_y = R1 * sin_theta  # (90,)

Anyway, please help me fix this issue!

And this is urgent!

Thank you...

fisheva commented 1 year ago

@rababR1 Eva Theme doesn't support Semantic Highlighting, nor support C_Cpp Enhanced Colorization. Whether there are display bugs is based on the following two settings. 企业微信截图_20221212165624 1.9.3 version has fixed the display errors of input and some characters. 企业微信截图_20221212164622 I write no Python code, so there are may still some errors and omissions in the coloring settings of Python code. Welcome to continue to raise issue.

rababR1 commented 1 year ago

Ok. Hope Python code will have beautiful semantic highlighting in the near future.

rababR1 commented 1 year ago

I'm glad the issue is fixed, but I'm so not sure about the color choice for int:

image

Personally, I like it like this:

image

(This is when semantic highlighting is set to "true")

Code Snippet:

numInput = int(input("Enter the number of inputs: "))
fisheva commented 1 year ago

@rababR1 int has the same first scope value as float, so it set to pink. 企业微信截图_20221213104305 企业微信截图_20221213104458 Can you teach me, in Python syntax, what does int mean here? Why does it look like it's executing a function? If its semantics are really like a function here, it should use the same blue color as function.

rababR1 commented 1 year ago

https://www.programiz.com/python-programming/methods/built-in/int

int() is a method, according to Programiz. But for w3Schools, int() is a function: https://www.w3schools.com/python/ref_func_int.asp

fisheva commented 1 year ago

@rababR1 I have set it blue in 1.9.5 version.

rababR1 commented 1 year ago

Okay...

I'm ok with it. In terms of the color

rababR1 commented 1 year ago

Also, I ported your theme to Replit. Is it A-OK without permission? image image image image image

fisheva commented 1 year ago

That's cool! It would be great if you could include a link to Eva Theme in the plugin description.

At the same time, you can send me a link after you finish it, and I will attach it here, like: Replit (by rababR1) 企业微信截图_20221228143613

rababR1 commented 1 year ago

Actually, the theme's already finished