Skip to content
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

Themes with advanced highlighting (potentially language-specific) #13556

Closed
troshko111 opened this issue Oct 12, 2016 · 2 comments
Closed

Themes with advanced highlighting (potentially language-specific) #13556

troshko111 opened this issue Oct 12, 2016 · 2 comments
Assignees

Comments

@troshko111
Copy link

  • VSCode Version:
    1.5.1
  • OS Version:
    Microsoft Windows [Version 10.0.14393]

Default Dark+/Light+ themes provide very basic highlighting (even though they're called +),
I scrolled through the issues and you guys always seem to say that current philosophy is to provide only declaration highlighting and stuff, that is fair enough when it comes to default themes.

But what if we (the community) want to create more advanced themes supporting highlighting of fields, method calls, static classes, string interpolations, enum values, assignments and so on. Where do we get scope lists for those? I tried to use various scope hunters with Sublime Text but none of the "hunted down" scopes actually worked which made me think scopes generated for vscode are different.

I know you try to create language agnostic themes, but that does not mean the community cannot create advanced (language-specific) themes, e.g. something like VS Dark + ReSharper "Color Identifiers" for C#

Using "Color Identifiers" with ReSharper has proven to be very effective in catching bugs and understanding code faster and easier since you have many more visuals and process information way faster

To give an example, right now I have these ReSharper provided extra identifiers colored:

<Item Name="ReSharper Constant Identifier" Foreground="0x00AA7698" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Field Identifier" Foreground="0x00A57393" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Method Identifier" Foreground="0x00A3B3C4" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Extension Method Identifier" Foreground="0x00A3B3C4" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Operator Identifier" Foreground="0x00C4BBA9" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Class Identifier" Foreground="0x00A59A76" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Interface Identifier" Foreground="0x00989521" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Struct Identifier" Foreground="0x00A59A76" Background="0x01000001" BoldFont="No"/>
<Item Name="ReSharper Enum Identifier" Foreground="0x00A59A76" Background="0x01000001" BoldFont="No"/>
@aeschli
Copy link
Contributor

aeschli commented Oct 12, 2016

This is no so much a limitation of themes, but of the grammars that generate the scopes that can be colorized by themes.
Currently, syntax highlighting is based on TextMate grammars, most of them created by the community and following the specs here. That's also where you would find the scopes that are commonly used. Some grammars go further than the specified scopes, but there are limitations on what can be done with TextMate. TextMate grammars can only see one line at a time. Languages like c# are very context sensitive and a real parser is needed that works on the whole file and even does symbol lookups to e.g. decide if a name is a variable or type name.
#11580 is about language parsers to colorise.
If you wanted to see something like this for C#, you'd have to file this feature request against the C# extension (https://github.com/OmniSharp/omnisharp-vscode).

@aeschli aeschli closed this as completed Oct 12, 2016
@troshko111
Copy link
Author

@aeschli It is already supported by omnisharp AFAIK, it's not exposed in vscode since it requires more than just regexp-based highlighting.

I actually found an issue which seems to be asking exact same thing,
#585

can you please close this one as a duplicate and link to the mentioned one? Would be also nice If you changed a title on the linked issue to include "semantic" so it's easier to find

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants