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 for hover documentation #245

Closed
fbricon opened this issue Dec 2, 2018 · 4 comments · Fixed by #447
Closed

Markdown support for hover documentation #245

fbricon opened this issue Dec 2, 2018 · 4 comments · Fixed by #447
Assignees
Labels
enhancement New feature or request hover
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Dec 2, 2018

Currently, hover returns documentation as text, meaning if the content is actual html, then the client doesn't render it in a user-friendly way. See a hover over the <packaging> element of a pom.xml:

screen shot 2018-12-02 at 1 13 02 pm

We could probably transform the html doc into markdown, using the remark library, like in jdt.ls. That'd also add jsoup as a dependency of the project.

@fbricon
Copy link
Contributor Author

fbricon commented Jan 24, 2019

screen shot 2018-12-14 at 4 02 11 pm

For now, the main issue I have with this approach is, escaped xml is swallowed during the markdown conversion. e.g for https:/felixfbecker/PowerShellXSD/blob/master/Test.Types.ps1xml:

screen shot 2019-01-24 at 9 22 27 am

@angelozerr
Copy link
Contributor

We could probably transform the html doc into markdown, using the remark library, like in jdt.ls. That'd also add jsoup as a dependency of the project.

Could we not create our own (very simply) markdown parser for that:

  • we will avoid having 2 new dependencies which will grow up the size of xml language server JAR
  • we will manage the markdown parser for our need like "For now, the main issue I have with this approach is, escaped xml is swallowed during the markdown conversion. "

@angelozerr
Copy link
Contributor

Fred i'm sorry to insist but i think we could use our xmlscanner to parse documentation and generate markdown. I think its not an hard task. No?

@fbricon
Copy link
Contributor Author

fbricon commented Jun 17, 2019

From a technical perspective, it would probably be better/more efficient to reuse the xmlscanner. But I'm not sure how much work it will be to rewrite a complete markdown converter, I'm not sure it'll be as easy as you think. But feel free to explore that option

NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 17, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 18, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 19, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 19, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 19, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 19, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen pushed a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 20, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes eclipse#245

Signed-off-by: Nikolas Komonen <[email protected]>
angelozerr pushed a commit that referenced this issue Jun 24, 2019
Fixed issue with confusion between html and already markdown documentation. Wrote unit tests

Fixes #245

Signed-off-by: Nikolas Komonen <[email protected]>
@angelozerr angelozerr added this to the v0.8.0 milestone Jul 23, 2019
@angelozerr angelozerr changed the title Return hover as Markdown Markdown support for hover documentation Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hover
Projects
None yet
3 participants