Is there AvaloniaEdit.TextMate package? #179
-
Hey. As far as I could understand, the demo is loading syntax packages from TextMate, but it doesn't seem to have a package. Also. Would you think it'd make sense to make syntax highlighting "native" for |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
About the first part afaik @Takoooooo is working on it. About the second question. What do you exactly mean by "make syntax highlight native"? |
Beta Was this translation helpful? Give feedback.
-
@danipen what I mean is that the demo looks and works awesome, but it appears that setting the syntax highlighting is not so easy. I personally dream of just (note that I'm quite a noob in GUI in general, so maybe my comments aren't relevant) |
Beta Was this translation helpful? Give feedback.
-
Well, as you may know, AvaloniaEdit is a port of AvalonEdit. It comes with its own syntax highlight built-in engine, and this is the default one right now. We need to maintain it for backward compatibility. We added TextMate as an extension, this is the reason it cannot work "built-in". We may change that in the future. But using TextMate is super easy. You can initialize text mate for a TextEditor textEditor = new TextEditor();
TextMate.TextMate.Installation textMate = textEditor.InstallTextMate(ThemeName.DarkPlus);
textMate.SetGrammarByLanguageId("csharp"); |
Beta Was this translation helpful? Give feedback.
-
Just set a null grammar for your textMate.SetGrammar(null); |
Beta Was this translation helpful? Give feedback.
-
Hey, we have recently released this package, if you are still interested feel free to use :) |
Beta Was this translation helpful? Give feedback.
-
I can't seem to get the example listed above to work.
I was trying to use 1.0.56 (the latest release) and I was getting the compile errors. I tried dropping back to 1.0.29. It compiles and runs without crashing/exceptions. Has something changed in the latest releases which makes the existing example obsolete? We would really like this functionality to be part of our release. Thx |
Beta Was this translation helpful? Give feedback.
Hey, we have recently released this package, if you are still interested feel free to use :)