Skip to content
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

Markdown support #1678

Open
nlisker opened this issue Sep 12, 2024 · 20 comments
Open

Markdown support #1678

nlisker opened this issue Sep 12, 2024 · 20 comments

Comments

@nlisker
Copy link

nlisker commented Sep 12, 2024

Markdown is a ubiquitous syntax. Adding a renderer or syntax highlighter that shows what the resulting look is would be helpful and, in my opinion, fitting for this toolset. Mylyn WikiText exists, but consider adding your alternative for a more complete solution.

@akurtakov
Copy link
Contributor

This project is built around language servers - so if you know of language server for editing markdown please give us a link to be evaluated. Implementing it as part of this project would mean reimplementing wikitext which would be loss of time for us.

@nlisker
Copy link
Author

nlisker commented Sep 12, 2024

There is https://github.com/artempyanykh/marksman. If doing this is not worth the work then feel free to close it.

@akurtakov
Copy link
Contributor

That's very interesting and has the potential to outsmart wikitext. IMO it's worth experimenting with standalone eclipse plugin integrating it - once usable it can be offered for inclusion here or to mylyn for easier redistribution. Are you interested in experimenting with it?

@nlisker
Copy link
Author

nlisker commented Sep 12, 2024

If you mean trying out a development version, then sure.

It also occurred to me just now that in Java 23, docs can be written in Markdown: https://openjdk.org/jeps/467. This means that Eclipse has to be able to show a preview of the docs (it does so for the HTML-based once), which in turn means that maybe the JDT team already has a markdown renderer. I'll try to dig a bit into this.

@nlisker
Copy link
Author

nlisker commented Sep 12, 2024

The relevant Eclipse issue is eclipse-jdt/eclipse.jdt.ui#1472. Also eclipse-jdt/eclipse.jdt.core#2744. Specifically, the solutions they brought up are Mylyn Wikitext and CommonMark, (eclipse-jdt/eclipse.jdt.ui#1472 (comment)), with the latter existing in Orbit already (eclipse-jdt/eclipse.jdt.ui#1472 (comment)), so they went with that.

Now I wonder if the solution they implemented can also be used for .md files. Needs more digging...

@nlisker
Copy link
Author

nlisker commented Sep 12, 2024

Here is the reply: eclipse-jdt/eclipse.jdt.ui#1472 (comment).

@mickaelistria
Copy link
Contributor

What are the current issues with Mylyn Wikitext for markdown edition?
I think some of what it's doing (reading the file and adding styles directly on the text) is actually very good, and I don't get what Wild Web Developer could do significantly better.
Can you please elaborate about the opportunities you have in mind?

@nlisker
Copy link
Author

nlisker commented Sep 20, 2024

Initially I thought it would just avoid the installation of multiple features because the solutions will be concentrated in one place. But now, according to @akurtakov, there is a potential for improvement of WikiText regardless of where it's distributed.

@mickaelistria
Copy link
Contributor

FWIW, we had some discussion with @akurtakov and the outcome is that we simply improved the TextMate themes shipped by TM4E. In the end, the generic editor with latest build of TM4E does a good job, sometimes better than wikitext.

@nlisker
Copy link
Author

nlisker commented Sep 21, 2024

the outcome is that we simply improved the TextMate themes shipped by TM4E

Can you link to these changes?

@mickaelistria
Copy link
Contributor

eclipse-tm4e/tm4e@3f557fa which can be tried from https://ci.eclipse.org/tm4e/job/TM4E/job/main/lastSuccessfulBuild/artifact/org.eclipse.tm4e.repository/target/repository/

@sebthom
Copy link
Contributor

sebthom commented Oct 23, 2024

@nlisker In combination with the TM4E/Generic Editor you can additionally install https://github.com/sebthom/previewer-eclipse-plugin which can render (GitHub Flavored) markdown.

@laeubi
Copy link
Contributor

laeubi commented Feb 8, 2025

@sebthom very interesting plugin! what I'm wondering is if it is somehow possible to integrate it with the generic editor to show an additional Preview tab?

I'm currently using a markdown editor that show it like this:

Image

and find it quite handy, this is also like its done in Github UI and many other editors. It could also be useful with an HTML editor.

@mickaelistria I think it would be very useful if the preview feature (extension point + view) would be part of generic editor at platform so the plugin of @sebthom can plug into this (and others maybe as well).

@mickaelistria
Copy link
Contributor

I don't think that the proposal with a preview editor tab is actually as interesting as a dedicated view. I remember I had considered that when doing an old "Draw2d preview" that was capable of rendering the figure that's being coded; and ended up convinced that a preview view is drastically better and that preview tabs on editor are somehow an antipattern.
And the reason why I think a separate view is better is that one may want to see the effect of their change as they type without having to switch between tabs. A "Preview" view works better for that as it can react to change on the current text editor immediately without need for any action.

@laeubi
Copy link
Contributor

laeubi commented Feb 8, 2025

A separate view has the disadvantage that I need double the space to show both and I always can only preview one document at a time.

Such feature do not needs to be exclusive and different user might use different ways (and one can even have a preference to switch the preview tab on/off) so one can offer both ways.

In any case I think the preview feature would be something that should be shipped by default with generic editor.

@mickaelistria
Copy link
Contributor

In any case I think the preview feature would be something that should be shipped by default with generic editor.

What if people who would still want wili edition but without the Preview tab because they prefer the reacting view?

@laeubi
Copy link
Contributor

laeubi commented Feb 8, 2025

In any case I think the preview feature would be something that should be shipped by default with generic editor.

What if people who would still want wili edition but without the Preview tab because they prefer the reacting view?

I don't understand?!?

  • Currently: I need to install https://github.com/sebthom/previewer-eclipse-plugin and if I want to extend it also need to depend on this
  • Desired: the preview view + extension point is part of platform so everyone can use/enhance it out of the box without need for extra plugin but might install https://github.com/sebthom/previewer-eclipse-plugin for additional preview support (e.g. markdown)
  • Maybe sometimes later: There will be an option for an (additional) Tab "Preview" in Generic Editor I can use as an alternative to the dedicated view. Or use it together with it, or ...

@mickaelistria
Copy link
Contributor

I don't understand either ;)
What would the desired extension point allow to achieve concretely? What would it extend and how?

@laeubi
Copy link
Contributor

laeubi commented Feb 8, 2025

What would the desired extension point allow to achieve concretely?

https://github.com/sebthom/previewer-eclipse-plugin/blob/main/plugin/schema/renderers.exsd

@sebthom
Copy link
Contributor

sebthom commented Feb 8, 2025

I think the option to add different tabs via an extension point to the generic editor for different forms of representation of the underlying data would be nice, similar to the m2e pom editor but I guess this seems to be the wrong repo to discuss that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants