question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LSP / When Hover.Contents.Kind is set to plain text the string, unexpected escape behavior

See original GitHub issue

Issue Type: Bug

When sending back the following response (see the trace below) to a Hover LSP request, what may appear as an HTML tag gets truncated (or hidden?).

[Trace - 4:27:21 PM] Received response 'textDocument/hover - (31)' in 1ms.
Result: {
    "contents": {
        "kind": "plaintext",
        "value": "U+0008, <control>"
    },
    "range": {
        "start": {
            "line": 153,
            "character": 9
        },
        "end": {
            "line": 153,
            "character": 13
        }
    }
}

What I expected to see:

A hover tooltip with the following content U+0008, <control>.

What I saw instead:

image

VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:44:30.902Z) OS version: Darwin x64 20.4.0

System Info
Item Value
CPUs Intel® Core™ i7-8850H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 5, 6, 6
Memory (System) 16.00GB (0.10GB free)
Process Argv –crash-reporter-id 06fd1910-60d0-4bee-99c6-1013780bf477
Screen Reader no
VM 0%
Extensions (4)
Extension Author (truncated) Version
vscode-eslint dba 2.1.20
vscode-npm-script eg2 0.3.21
go gol 0.25.0
vim vsc 1.20.2

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt943cf:30300583
vspre833cf:30267465
pythonptprofiler:30281270
vshan820:30294714
vscoreces:30290705
pythondataviewer:30285071
vscus158:30286553
vscgsv2ct:30301613
vscorehov:30301222
bridgeflightcf:30302070
vscod805cf:30301675

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
rcjsuencommented, Sep 27, 2021

@jhchabran @pedro-w @dbaeumer FYI https://github.com/microsoft/vscode/issues/124874 seems fixed in the latest Insiders build of VS Code.

1reaction
rcjsuencommented, Jun 3, 2021

MarkdownString.appendText doesn’t do anything special about > and <

That is what I noticed also and is why I opened https://github.com/microsoft/vscode/issues/124874.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Server Protocol Specification - 3.17
A MarkupContent literal represents a string value which content can be represented in different formats. Currently plaintext and markdown are supported formats.
Read more >
LSP: How should hover on longer text be displayed? #12281
Currently, vim.lsp.buf.hover() will display this like the following. I was split vertically when I did this. ... What do you think about doing ......
Read more >
Full Release Notes Index - Humio Documentation
Fixed a bug where very long string literals in a regex could cause a query/parser to fail with a stack overflow. Humio Server...
Read more >
Untitled
Soy sauce kikkoman ingredients! Buy boilie rolling machine, Kwame amponsah, Freenote microtonal guitar! Zeinab zaza, City of worcester parking meter hours, ...
Read more >
PHP Tools for Visual Studio and VS Code by DEVSENSE
* settings to configure the formatter to behave as you wish. For a detailed list of formatting options, either open the Settings Editor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found