Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23553

LanguageClient.Capabilities.codeActionProvider probably isn't parsed correctly

    XMLWordPrintable

    Details

    • Commits:
      65e2e374069d3e9e331105bdc8866efa26b9960d (qt-creator/qt-creator/4.11)

      Description

      Why connecting to server I get a warning in general messages tab: `LanguageClient ocamllsp 4.07: Initialize result is not valid: capabilities->codeActionProvider->Expected type Bool but value contained Object`

      Interesting part of JSON is:

      send: {
        "id": "{9ebff7c5-a847-4de9-82a7-8be52d691fe9}",
        "jsonrpc": "2.0",
        "result": {
          "capabilities": {
            "codeActionProvider": { "codeActionsKinds": [ "destruct" ] },
            ...
          }
        }
      }
      

      Specification says that

      	/**
      	 * The server provides code actions. The `CodeActionOptions` return type is only
      	 * valid if the client signals code action literal support via the property
      	 * `textDocument.codeAction.codeActionLiteralSupport`.
      	 */
      	codeActionProvider?: boolean | CodeActionOptions;
      

      It seems that QtCreator expects only boolean value there and doesn't parse this as `CodeActionOptions`.

      Also positioning of arrows seems to be weird but it is a minor issue

      P.S. Sorry if this is already reported somewhere

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              davschul David Schulz
              Reporter:
              kesarev Dmitrii
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes