-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Provide generator fragment for TextMate grammars #1329
Comments
TODO:
|
Hint: The YAKINDU Solidity-IDE project already contains a hand-written TextMate grammar, see solidity.tmLanguage. This could serve as a good starting point when implementing such a generator fragment. |
Hi, we are thinking about writing one generator fragment for TextMate grammars for our codebase. We would start with something simple (e.g. keywords, maybe comments and strings as suggested above). I think it would be nice if we could contribute it, so I would like to check beforehand what would be the criteria for inclussion.
Do you have any input? |
having keywords, strings, ints, comments should be enhough |
@rubenporras A contribution would be very welcome. This has been a long standing issue and it's great that you're volunteering to look into it. Can you please help me understand why you'd need a library that serializes gson for that fragment? If it's not too cumbersome, a plain text generation is probably the best fit for the existing abstractions. Keywords as a starter would be fine. A few questions:
|
Hi @szarnekow,
|
@rubenporras with you ui plugin: do you mean the .ide or the .ui plugin. in most textmate usescases like vscode there wont be a .ui plugin i guess. |
@cdietrich , yes, some use cases might not have such .ui plugin, or maybe since it is small (basically the TextMate grammar and the plugin.xml to register a bunch of extension points, like a custom DocumentProvider), one would prefer to have the grammars for all supported DSLs in one plugin (i am actually thinking about that for our product). I can imagine, we could make it configurable. |
Just found this. Is there any update? |
not from my side |
Hi @cdietrich , we have by now written this generator and have used it internally, similar to #2639, it is not fully generic but a bit trimmed down to simplify the implementation given our needs. Since we are now not working on it actively, I propose that we close the issue, unless you are interested in our implementation. If you are interested, I can go through the code, post the simplifications we did, and if you are still interested, see if we can do a PR. |
A first version of it is available on main in https://github.com/eclipse/xtext/tree/main/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/textmate |
@rubenporras Maybe you had something different in mind. We'd be happy to apply any improvements to this first version of the fragment. |
Maybe this will help someone else. To generate a textmate grammar, add
inside the |
It would be useful if Xtext could provide a generator fragment that creates a
tmLanguage
TextMate file for the grammar. This can be useful for the creation of language server extensions that make use of TextMate grammars like VSCode.See also #1327
The text was updated successfully, but these errors were encountered: