-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 the colorizer (IntelliSense/Semantic-based) #230
Comments
|
@be5invis Not sure if this is what you want, but it could be a workaround for now. Since the latest VS code you can indeed set colors for operators, like so:
|
Another thing I would like to be colorized, and I'm assuming it falls on this extension: Different colors for function definitions vs function calls. Like this: It would make it much easier to see the structure of the code at a glance. Actually they do have slightly different TM scopes, but I tried overriding the function call's color like this but it doesn't seem to change anything:
|
There doesn't appear to be a way for us to do much of what we want right now because colorization is managed by TextMate grammars (regular expressions) instead of based on semantic parsing of the file. I do see a feature request open on VS Code to enable a better mechanism microsoft/vscode#1967 |
(go and upvote that vscode issue and maybe they'll prioritize implementing it) |
Any updates on this issue? |
@DaOnlyOwner No progress has been made in regards to improving colorization, other than general infrastructure/porting. The cpptools extension doesn't currently implement any colorization for C++. It's done by VS Code using TextMate and atom/language-c. |
Did you upvote the issue I linked? VS Code needs to give us a better API before we can make any progress on this. |
What do you need to improve the colorizer? Is it enough to expose ITokenizationSupport to extensions as suggested by the author of the linked issue? |
No, how do I upvote an issue? |
Open the issue and click the "thumbs up" icon on the original post to add your vote. |
Oh so you upvote the post not the issue itself, gotcha ;) |
microsoft/vscode#1967 was closed as a dupe of microsoft/vscode#585, so we'll track that instead now. Be sure to go and upvote it. |
I hope that this issue solved as soon as possible. |
VSCode has a text decoration API that we intend to use for graying out inactive regions in the February update. We're tracking that implementation with #1466. Still need to investigate whether this will be fast enough to be used to replace the textmate coloring for the entire file or not. |
colorizing structs and macros would be really helpful |
I too would like to see improved syntax highlighting. My biggest annoyance is that defines, macros and typedefs are not colorized when used, and they should be. Typedefs, at the very least, should use the same colors as built in types (int, char). |
If the member and member function can be highlighted in different color, it would be great help. |
@sean-mcmanus I saw you modified the milestones to June 2019, So this will be supported at the end of June? |
That's the goal. We're still working with the VS Code team to provide us a proper API for this, but in the meantime we've figured out a way to get the colors in the editor without it and the performance looks acceptable. We will also provide a setting to disable the experimental coloring in the event that anyone has performance problems or prefers the TextMate coloring. |
It sounds good. Thanks for your reply. |
Is it possible to set different colors for macro/struct/Union/enum variables and local/global variables if semantic-based finished? |
Nice to hear this, so we should expect the rollout in a months time or less right? |
@Lennon925 you can customize the colors using the @aminukano585 we are currently testing the implementation and doing some optimizations. We're hoping to have something available for insiders to try in about 2 weeks or so. |
It can't solve my problem to customize the colors using the 'editor.tokenColorCustomizations' setting. Because it can't distinguish variables type. It colorize ENUM/Struct/Union/Macro with the same color. |
@Lennon925 We support local/global var colors with variable.other.local and variable.other.global, and macros with entity.name.function.preprocessor, but enum/struct/union appear to just map to entity.name.type -- @Colengms would it be easy/possible to distinguish between enum/struct/unions? |
It seems that it works just for definitions. For references, it doesn't work. |
@Lennon925 We haven't shipped the feature yet -- if you're using the in-progress TypeScript branch, it won't work due to the binaries not being published yet -- I think we'll need to publish the pre-release binaries when the change is ready to be checked in in order for the GitHub tests to pass. |
We have released an insiders build with the colorizer improvements. We would encourage you to try out the feature and provide feedback on the experience. Please note that many VS Code themes don't have full support for all of the code items (yet), so you might need to augment your themes with customizations. There is more information, including full example settings for light/dark themes here: Colorization docs |
@JimmyDeemo Our extension doesn't run on Objective-C/C++ files. Our parser isn't configured to parse it correctly, so semantic colorization wouldn't be correct. |
Thanks for explaining. 👍 |
The current built-in colorizer for C/C++ does not support:
The text was updated successfully, but these errors were encountered: