0

The documentation on completion is not shown in VS Code even if the language server sends the completionItem/resolve with documentation.

screenshot of vscode

[Trace - 3:33:37 PM] Sending request 'completionItem/resolve - (33)'.
Params: {
    "label": "append",
    "detail": "'a list -> 'a list -> 'a list",
    "insertTextFormat": 1,
    "textEdit": {
        "newText": "append",
        "range": {
            "start": {
                "line": 10,
                "character": 5
            },
            "end": {
                "line": 10,
                "character": 5
            }
        }
    },
    "kind": 12,
    "sortText": "0003",
    "data": {
        "textDocument": {
            "uri": "file:///Users/ulugbekna/codef/scratch-ocaml/gadt.mli"
        },
        "position": {
            "line": 10,
            "character": 5
        }
    },
    "deprecated": false
}


[Trace - 3:33:37 PM] Received response 'completionItem/resolve - (33)' in 3ms.
Result: {
    "label": "append",
    "kind": 12,
    "detail": "'a list -> 'a list -> 'a list",
    "documentation": {
        "kind": "markdown",
        "value": "Concatenate two lists. Same as the infix operator `@`.\nNot tail-recursive \\(length of the first argument\\)."
    },
    "deprecated": false,
    "sortText": "0003",
    "insertTextFormat": 1,
    "textEdit": {
        "range": {
            "start": {
                "line": 10,
                "character": 5
            },
            "end": {
                "line": 10,
                "character": 5
            }
        },
        "newText": "append"
    }
}

The screenshot is from an OCaml file. I'm using OCaml Platform extension and ocamllsp language server.

  • what if you type Ctrl+Space – rioV8 Oct 03 '20 at 15:19
  • What rioV8 said, you need to switch to the "detailed view". Instead of pressing the shortcut you can also click the "Read More" button that appears on the right when you hover over it. https://i.imgur.com/hnvt4Nt.png – Gama11 Oct 05 '20 at 08:19
  • @rioV8 on my another computer the documentation is shown without ctrl+space; ctrl+space doesn't help – Ulugbek Abdullaev Oct 05 '20 at 13:50

0 Answers0