-
Notifications
You must be signed in to change notification settings - Fork 56
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
bundle as many textmate files as possible to have out of the gate great support #63
Comments
Hey @maxandersen ! Glad tm4e could interesest you!
Totally agree with you, but today the problem is that you can link a TextMate grammar with an editor only with extension point:
To fix that, we need to fix GenericEditor issue #17 in other words gives the capability to link TMPresentationReconclier with any content type ( Once we have will have this feature user will have the capability to register with TextMate Preferences a grammar #32 and link to this grammar the In other words, I'm waiting for https://bugs.eclipse.org/bugs/show_bug.cgi?id=507753#c2 will be fixed in GenericEditor to work on TextMate Preferences. We could after provide too a plugin which resgister a lot of TextMate grammar (a catalog kind) binded to the |
Note that the issue of dynamically (without extension) detecting a textmate grammar for a given document/file isn't a blocker for this one. |
There are already a few one in the "TM Samples" bundle which is part of the p2 repo. However, those aren't registered in the generic editor. |
Signed-off-by: Mickael Istria <mistria@redhat.com>
Issue #63: connect sample grammars to Generic Editor
@maxandersen just for your information, now you can register your TextMate grammar with user preferences. User must download the TextMate grammar but after you can consume it. Here a little demo: As you can see, there is a basic TextMate Editor (extends TextEditor and configure it with TMPresentationreconciler), but my goal is to do that with GenericEditor too. Please note that the first time the grammar is found because cs grammar was already registered. I runregister it with preferences (but demo don't show preferences page). The second time, when TextMate Editor is opened, grammar is not found and it suggest to register it) Hope you will like it and any feedback are welcome! |
Excellent! |
Glad it please you @maxandersen :) |
Hi experts, I'm currently testing eclipse-committers-oxygen-M7, and I had put big hopes that the generic editor would deliver syntax highlighting for shellscript (*.sh) files. I noticed that *.sh is by default associated with "Text Editor", so I used right-click > open with > Internal > Generic Editor to change that association. Alas, still no syntax highlighting :( From what I read here, it sounds I need to download a TextMate grammar myself, I'll try that next. What would be needed to have *.sh syntax highlighting out of the box in Oxygen? Should I report it on Eclispe bugzilla as a first step? If yes, which project/component? Thanks! |
BTW @angelozerr your animated GIF from the demo crashes Safari reproducibly on OSX 10.11.6 :( but Chrome can handle it. |
@moberhuber if I understand you wish to use tm4e (for syntax coloration) with Generic Editor? If you wish to do that you can write a plugin for that to link GenericEditir with your sh TextMate grammar. If you don't want to write plugin you can do that with TextMate Preferences (see the demo). For the moment it's a custom TextMate Editor but I think we could do that with GenericEditor too (I mean for user preferences). Any contribution are welcome (or be patient, I must find time to study how to that, @mickaelistria suggsted me some ideas, but just find time)! If you are OK to use TextMate Editor, you must:
|
Hey @angelozerr that was a quick answer :) I am fine using the TextMate editor, and just got it to work:
Notes:
At any rate, it seems to be much faster than ShellEd (which I found unusable due to its slowness and its peculiar taste regarding indentation). I'll keep using Eclipse + TM4E for a while - if it's comparable in performance and features to gedit or vim, I'll be more than happy - I'll let you know what I find :) Thanks and Cheers, |
cc @akurtakov who can explain more about ShellEd vs TM4E and the future of ShellEd.
Sounds nice. Please create a new enhancement request for that.
I don't know if this is something TM4E can provide. In many cases, outlines are produced by language servers nowadays. Maybe it would be worth creating a language server for bash? (cc @akurtakov ) |
The wizard tell you that, no? Which feature do you want? Please create a new issue for that. |
well, making a language server for bash is beyond my time limits. Altough I would love to redo shelled ontop of one such. If/when I find time I plan on redoing shelled on top of tm4e or ideally someone would jump in to help with that, it's related with driving DLTK project ahead too as it's currently at Neon level and will need to jump to Oxygen first. I hope to make this happen soonish. The general plan for shelled is to be redone on top of generic editor with tm4e if a lang server pops up by then maybe even on top of lsp4e, but all this work is if/when time permits. |
WIP at #374 |
TM4E 0.6.0 has been released providing a new language pack feature. |
see $subject
tm4e really should be in EPP together with a library of as many textmate files as possible IMO.
Should not require users to install additional libraries or having to do another tycho plugin buil dsetup just to get started on syntax highlighting imo :)
The text was updated successfully, but these errors were encountered: