Git Product home page Git Product logo

Comments (13)

fbricon avatar fbricon commented on August 27, 2024

Most likely caused by the server sending plain text doco. It should return markdown instead.

from vscode-xml.

angelozerr avatar angelozerr commented on August 27, 2024

It should return markdown instead.

Please create an issur for that. But the main problem is that teh xsd:documentation can be written in any format (text, html, other). So how to convert any format to markdown?

from vscode-xml.

felixfbecker avatar felixfbecker commented on August 27, 2024

Plain text renders fine as markdown. Markdown can include HTML, so HTML renders fine as markdown too. Are there any other formats used in the wild?

from vscode-xml.

angelozerr avatar angelozerr commented on August 27, 2024

@felixfbecker you mean that lsp4xml doesn't need to convert to a markdown format? Just set the the MarkupContent as "markdown" kind?

from vscode-xml.

felixfbecker avatar felixfbecker commented on August 27, 2024

Yeah. That's what all language servers I know do

from vscode-xml.

fbricon avatar fbricon commented on August 27, 2024

Vscode markdown renderer does not support HTML in markdown documentation. See microsoft/vscode#21141 (comment)

from vscode-xml.

felixfbecker avatar felixfbecker commented on August 27, 2024

But how would marking the content as markdown (which it technically is in that case) be any worse than marking it as plain text? In both cases you see HTML tags in VS Code, but text without HTML renders way nicer and other clients do not have this problem. Also, the hovers already seem to use markdown anyway?

from vscode-xml.

fbricon avatar fbricon commented on August 27, 2024

Related server side issue: eclipse/lemminx#245

from vscode-xml.

fbricon avatar fbricon commented on August 27, 2024

I quickly tried markdown rendering with remark: https://github.com/fbricon/lsp4xml/tree/remark:

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

from vscode-xml.

fbricon avatar fbricon commented on August 27, 2024

@angelozerr we have Markdown support on hover now but not for completion. Should be pretty straightforward to add

from vscode-xml.

angelozerr avatar angelozerr commented on August 27, 2024

@angelozerr we have Markdown support on hover now but not for completion. Should be pretty straightforward to add

Yes sure, we must just take care of documentationFormat coming from client capabilities:

"completion": {
...
                "completionItem": {
...
                  "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],

I fear that we have not done that for hover by checking contentFormat capability

from vscode-xml.

fbricon avatar fbricon commented on August 27, 2024

Fixed with eclipse/lemminx#528

from vscode-xml.

fbricon avatar fbricon commented on August 27, 2024

Also includes link to (local cache of) schema:
hoverandcompletionmarkdownsupport

from vscode-xml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.