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

Face for operators such as = * / separate from type face #171

Open
kauesena opened this issue Apr 11, 2022 · 4 comments
Open

Face for operators such as = * / separate from type face #171

kauesena opened this issue Apr 11, 2022 · 4 comments

Comments

@kauesena
Copy link

There should perhaps be a face for types and a face for symbols such as +=-^/*: which act as operators so that they would not have necessarily the same colour as types.

function quadratic2(a::Float64, b::Float64, c::Float64)
    # in emacs Float64 and = ^ - * are coloured the same
    sqr_term = sqrt(b^2-4a*c)
    r1 = quadratic(a, sqr_term, b)
    r2 = quadratic(a, -sqr_term, b)
    r1, r2
end
@tpapp
Copy link
Collaborator

tpapp commented Apr 12, 2022

I have nothing against customizability of these typefaces per se if there is a demand, but note that operators and types are rarely adjacent in code so I am not sure I understand why having the same color is a problem.

Generally themes try to make do with 8-10 "base" colors for text, simply because adding more just crowds the color space so they become hard to distinguish anyway.

So I would suggest the following: let's wait a month to hear from others, and if there are no objections then we can add a face.

@kauesena
Copy link
Author

@tpapp. As there hasn't been any contrary comment, do you find it okay to add the faces?

@tpapp
Copy link
Collaborator

tpapp commented Jul 11, 2022

A PR is welcome. Note that we enumerate operators already in julia-hanging-operator-regexp, so a list could easily be factored out to avoid duplication.

@kauesena
Copy link
Author

I'll bear that in mind.

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

2 participants