atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
389 stars 78 forks source link

Hover markdown is not syntax highlighted #283

Closed alexheretic closed 4 years ago

alexheretic commented 4 years ago

rust-analyzer language server sends markdown hover text. This is displayed but not syntax highlighted.

Example

If I take a empty rust project with the following main.rs code:

fn main() {
    let _foo = vec!["hello", "world"];
}

When I hover on _foo the language server provides the following textDocument/hover response

{
  "contents": {
    "kind": "markdown",
    "value": "```rust\nVec<&str>\n```"
  },
  "range": {
    "end": {
      "character": 12,
      "line": 1
    },
    "start": {
      "character": 8,
      "line": 1
    }
  }
}

The markdown is asking for rust highlighting but not getting it

Downstream: https://github.com/rust-lang/atom-ide-rust/issues/158