C
C#2y ago
Murphy

❔ Textmate themes for custom languages?

So it's apparently possible to add support for custom syntax highlighting via textmate grammars according to https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/TextmateGrammar . I can find no other documentation online about doing this with Visual Studio though. I'm just trying to highlight multiple keywords in a different color in my custom language, but I have absolutely no idea if I'm doing this correctly since I'm getting
System.InvalidOperationException: IWpfTextView.TextViewLines is invalid.
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Microsoft.VisualStudio.Text.Editor.IWpfTextView.get_TextViewLines()
System.InvalidOperationException: IWpfTextView.TextViewLines is invalid.
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Microsoft.VisualStudio.Text.Editor.IWpfTextView.get_TextViewLines()
whenever I try to use the tmTheme file and then open the file. If I leave it out, it seems to work and match my two regexes fine. They're just the same color. Is there a way to actually specify the colors?
GitHub
VSSDK-Extensibility-Samples/TextmateGrammar at master · microsoft/V...
Samples for building your own Visual Studio extensions - microsoft/VSSDK-Extensibility-Samples
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?