tm4e icon indicating copy to clipboard operation
tm4e copied to clipboard

Provide an IInformationControl to render Markdown syntax with hover

Open angelozerr opened this issue 9 years ago • 2 comments

Provide an IInformationControl to render Markdown syntax with hover

angelozerr avatar Dec 09 '16 18:12 angelozerr

@angelozerr do you rembember what this issue is exactly about or can we close it? I don't understand why TM4E should provide an IInformationControl (to whom?) to render which Markdown syntax? How is that related to TextMate syntax highlighting?

sebthom avatar Nov 18 '25 18:11 sebthom

My initial motivation was that LSP4E's hover effect didn't support Markdown syntax for code colorization (GitHub syntax with triple tildas). So I debugged VS Code to see how it handled it and discovered it used the Marked library. The project https://github.com/eclipse-tm4e/tm4e/tree/main/org.eclipse.tm4e.markdown is a Java port of Marked and it can colorize code included in GitHub syntax using tm4e's TextMate tokenizer.

If you save a grammar B in tm4e and use it to display code on hover (e.g., you add a comment to a JS file referencing grammar B), it allows you to display the code of grammar B using TextMate. Using highlight.js has its own parsers, and the hover rendering may differ from that of the editor managed by tm4e.

It was starting to work, but I don't remember its status.

angelozerr avatar Nov 18 '25 19:11 angelozerr