Syntax highlighting consistency
See original GitHub issueIs your feature request related to a problem? Please describe. I’m filing this as a feature request as it seems to be an issue with vanilla VS Code. However, I think vscode-R does some syntax highlighting improvements and I hope this can be added. Request: Make the syntax highlighting rules more consistent.
Describe the solution you’d like All function calls should look the same, object references should look the same.
Describe alternatives you’ve considered
Perhaps this is more an issue with the particular theme. I’m not too sure the contributions between VS Code + vscode-R + theme. I’ve tried editing editor.tokenColorCustomizations
with no success.
Additional context
VS Code using Monokai theme below (other themes have same issue including Abyss, Solarized Light). Note that the mutate
function and my_function
are not blue. x,y,z
are styled differently depending on the surrounding punctuation, etc.
Compare this with the same code in Sublime below for desired feature.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
@wkeahi Yes, the color is indeed theme-specific. If you use other themes, it is more likely that different colors are assigned to variables and function calls.
I have this issue as well. It might be worth taking a closer look at vscode-R’s syntax definitions in general, as there are outstanding syntax issues (e.g. raw vectors)
It also might be worth looking into unit tests for syntax highlighting, as there appears to be edge cases that pop up unexpectedly when altering the syntax. I saw some libraries for this in passing, will update if I see them again.