-
Notifications
You must be signed in to change notification settings - Fork 25
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
Highlighting doesn't pick up built-in functions/variables #51
Comments
This is a feature that doesn't exist in the extension. It's a good idea, just a matter updating the .tmlanguage file. Honestly, I haven't touched it in over 3 years I think, so it might be out of date for multiple reasons. I didn't even make the file, just borrowed the one that the Processing Sublime plugin uses https://github.com/b-g/processing-sublime - Which also hasn't been updated in about 3 years it seems? If you'd like to figure out what the syntax is for adding those build in function names, please feel free to make a PR updating the tmlanguage file! |
The extension still works great - I might make figuring out the tmlanguage
file a weekend project one of these days :)
…On Thu, Aug 16, 2018 at 1:38 PM Tobiah Zarlez ***@***.***> wrote:
This is a feature that doesn't exist in the extension. It's a good idea,
just a matter updating the .tmlanguage file. Honestly, I haven't touched it
in over 3 years I think, so it might be out of date for multiple reasons.
I didn't even make the file, just borrowed the one that the Processing
Sublime plugin uses https://github.com/b-g/processing-sublime - Which
also hasn't been updated in about 3 years it seems?
If you'd like to figure out what the syntax is for adding those build in
function names, please feel free to make a PR updating the tmlanguage file!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXt09UtsY68CKYLq8wn4f3tsWSuQQ3Dzks5uROkhgaJpZM4V_G5r>
.
|
Those variables are in the TextMate grammar, but the default VSCode themes don't have a different color for everything. You have to find the corresponding scope (e.g. "editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "constant.other.processing",
"settings": {
"foreground": "#00FF00"
}
}
]
} You can also specify different colors for each available theme. See https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme P.S. Instead/In addition of the color ("foreground") you can change the "fontStyle" (e.g. to "Italic") |
That explanation seems like something that could be turned into an useful instructional blurb in the readme! |
Presently processing-specific variables like width, height, frameRate, PI etc. aren't highlighted (and neither are built-in functions like setup(), keyPressed() etc), which can be confusing to beginners (I'm currently teaching someone to code using Processing so I've been thinking a lot about this kind of stuff lately).
Here's a comparison image (Processing editor on top, VSCode on bottom - note setup(), width and PI):
I have no idea how .tmlanguage files work but I would imagine it could be as simple as manually adding them to the dictionary somehow?
The text was updated successfully, but these errors were encountered: