-
Notifications
You must be signed in to change notification settings - Fork 151
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
How to make own grammar ? #385
Comments
Grammars are provided by TextmateSharp repository. |
are you sure ?? danipen/TextMateSharp#20 .. btw i dont know where to even start :( please make valuable docs or sample, since there is really nothing useful out there. I would preferer use json or xml from existing grammar... |
What do you need, please describe. |
Okay, please, I need to create my own grammar. I did develop a language very similar to C#, but it will include new keywords. My idea is to take the existing grammar of C# and modify it or simply add some new keywords to existing grammer somehow. |
Yes so you'd need to base on the existing TextmateSharp c# grammar and make your changes from there. No docs are provided 😔 |
ok thx this is i know i guess but how to load this to AvaloniaEdit without recompile whole lib ? I did not find any way to load custom grammar to AvaloniEdit. There is not such a options or at least i did not find one.. :( even I use IRegistryOption internal class ResmGrammer : IRegistryOptions
{
public IRawTheme GetDefaultTheme()
{
throw new NotImplementedException();
}
public IRawGrammar GetGrammar(string scopeName)
{
throw new NotImplementedException();
}
public ICollection<string> GetInjections(string scopeName)
{
throw new NotImplementedException();
}
public IRawTheme GetTheme(string scopeName)
{
throw new NotImplementedException();
}
} this is all you get and this does not lead to any custom load or anything else.. So basically i have no idea how to use it in AvaloniaEdit, how to load... |
Yes you need to build custom |
Does textmate only support C#? When I use other language extensions, nothing happens. It’s still C#’s syntax highlighting. |
Hi is there any docs or sample how to make own grammer please ? I would need modify c# grammer and made some changes. How to do it pls ? There is not any docs.. :(
Regards
The text was updated successfully, but these errors were encountered: