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
Improve tmlanguage #72
base: main
Are you sure you want to change the base?
Conversation
"name": "punctuation.gleam" | ||
}, | ||
"3": { | ||
"name": "entity.name.function.gleam" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be controversial to assume every Y in X.Y is a function, but we can do better if we can feed the data from ast into the syntax somehow like I believe rustanalyzer does, although I'm not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause the following:
let wibble = get_wibble() // <-- Wibble is blue
wibble.wobble // <-- Wibble is green, wobble is yellow
wibble.wobble(wibble) // <-- First wibble is green, second wibble is blue
(I see the GitHub highlighting has this same issue.)
This hints to the user that wibble
is a module, which it is not, and that wobble
is a function, which it might not be. I understand it's difficult if not impossible to make the distinction. But I fear that the variable changing colour when it is used could be confusing.
I might be the only one with this opinion so don't take it too strongly yet.
"include": "#dot_expressions" | ||
}, | ||
{ | ||
"include": "#any_string_of_lowercase_text_with_underscore_and_number" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a better name for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
"include": "#any_string_of_lowercase_text_with_underscore_and_number" | |
"include": "#lowercase_text_with_underscore_and_number" |
In the import lists, the final module name is blue, but in the body modules are green and variables are blue. Could the modules use the same colour? |
Hello! Could you explain what improvements you're looking to implement here. Thank you |
Hi, absolutely.
|
Sorry, what I mean is what are you aiming to improve by adding these colours? To me now that most everything has colour nothing in particular stands out. |
For some people, having the color is instrumental in being able to at a glance understand what code is doing. I think this is a net improvement considering we already have some syntax highlighting and you can code without the extension if you think that adding colors distracts from the code. |
Current Syntax Highlighting vs Syntax Highlighting with this PR