How do I use TextEditor and TextMate for syntax highlighting? #391
Replies: 6 comments 7 replies
-
AvaloniaEdit uses Are you referencing an specific version of |
Beta Was this translation helpful? Give feedback.
-
OK I was trying to use 1.0.56 (the latest release) and I was getting the compile errors. Has something changed in the latest releases which makes the existing example obsolete? |
Beta Was this translation helpful? Give feedback.
-
I don't think so... Does the demo app works for you? |
Beta Was this translation helpful? Give feedback.
-
So I do/don't need to include TextMate directly in my solution? |
Beta Was this translation helpful? Give feedback.
-
Same as the demo project ... https://github.com/AvaloniaUI/AvaloniaEdit/tree/master/src/AvaloniaEdit.Demo |
Beta Was this translation helpful? Give feedback.
-
Hi:
I'm trying to get AvaloniaEdit.TextEditor working with TextMate so I can support syntax highlighting.
I'm using the example from GitHub
I've installed packages:
AvaloniaEdit.TextMate
TextMateSharp.Grammars
I'm following this example:
using AvaloniaEdit;
using AvaloniaEdit.TextMate;
using TextMateSharp;
using TextMateSharp.Grammars;
var _textEditor = this.FindControl("Editor");
var _registryOptions = new RegistryOptions(ThemeName.DarkPlus);
var _textMateInstallation = _textEditor.InstallTextMate(_registryOptions);
_textMateInstallation.SetGrammar(_registryOptions.GetScopeByLanguageId(_registryOptions.GetLanguageByExtension(".cs").Id));
I'm getting the following compile error in VS:
The type 'IRegistryOptions' is defined in an assembly that is not referenced.
You must add a reference to assembly 'TextMateSharp, Version=1.0.29.0, Culture=neutral, PublicKeyToken=null'.
I installed the TextMate package, but still get the same error.
What am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions