-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Provide an API for advanced/semantic source highlighting #585
Comments
From @egamma on October 13, 2015 14:40 The request makes sense OmniSharp supports semantic coloring and we currently have no API to expose this support. |
From @Krzysztof-Cieslak on October 13, 2015 14:43 👍 Same can be used for F# - Visual F# Power Tools for VS and F# support in Xamarin Studio are both using semantic highlighting. |
We are close but we are missing meta-colours ala the-color-of-a-keyword |
Any progress with it? :) |
Desperately want to know whether there've been any progress on this. |
Me2. Could you or will you expose it as json settings kinda like settings.json or keybindings.json? |
Would love to see this happen. Honestly, it'd be great to have a way to provide colorization without a textmate grammar. The C# extension has incredibly accurate colorization information already available to it in OmniSharp (using the same Roslyn APIs that are used to colorize VS). |
This would be extra nice. And if what @jrieken said a year ago still holds true, it shouldn't be extra hard to implement. |
Opened similar issue before found this one, since |
+1 ⌨️ |
Not just that, customizing some keywords based on project would also be amazing, there is a lot of C++ code that relies on macros or uses some specifics, and ability to highlight that "easily" would be nice. |
Do the changes made for #18317 bring us closer to semantic highlighting? |
Suppose I want to highlight my own keywords / variables, how can I test this? My solution https://github.com/kobalicek/reloaded-cpp is just a hack at the moment, rewriting it to use existing C++ parser and just hooking it to my own symbol highlighter would be the way. |
This tree-sitter based syntax hailighting seems pretty advanced- |
Just noticed some blessed soul added the joggy boi emoji to this feature on the roadmap and it fills my heart with hope. I believe in you, VS Code. |
Just wanted to mention that, while we wait for the VSCode team to release an official API for semantic highlighting, in the C++ community we've been using |
We have started working on a vscode.d.ts API for semantic highlighting. There will be an other proposal on the provider API. |
Done via #86415 |
From @Wosi on October 13, 2015 14:22
I'm looking for a way to implement an advanced source highlighting
where a language service changes the color of words in a file. The result would look similar to the output Visual Studio creates in C# files.
The screenshot shows C# code in Visual Studio. The word "Customer" is highlighted differently based on its context:
To implement highlighting like this it's necassary to let a language service decide about the color of a word after the grammar based highlighter has done its job.
I would like to see an API for this in the future.
Copied from original issue: Microsoft/vscode-extensionbuilders#14
The text was updated successfully, but these errors were encountered: