Help with starting a third party LSP

Hello,

I have zero experience working with LSPs.
I am trying to hook up a third party LSP into my extension. I used the extension template provided by Nova and have the debug turned on. The extension finds the executable file and runs with the correct Arguments.

However when it is connecting, it shutdowns with the following error:

Example Language Server connection closed unexpectedly: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "result", intValue: nil), CodingKeys(stringValue: "capabilities", intValue: nil), CodingKeys(stringValue: "hoverProvider", intValue: nil)], debugDescription: "Expected Bool or HoverOptions", underlyingError: nil))

Here is the JSON response by the LSP

Example Language Server[17:11:41.087000] Received JSON-RPC response: number(0) initialize
{
  "id" : 0,
  "jsonrpc" : "2.0",
  "result" : {
    "serverInfo" : {
      "version" : 1
    },
    "capabilities" : {
      "executeCommandProvider" : {
        "commands" : [
          "create_component",
          "create_livewire_component"
        ]
      },
      "completionProvider" : {
        "triggerCharacters" : [
          "<",
          ":",
          "@"
        ]
      },
      "hoverProvider" : "Phpactor\\LanguageServerProtocol\\HoverClientCapabilities",
      "definitionProvider" : "Phpactor\\LanguageServerProtocol\\DefinitionClientCapabilities",
      "documentSymbolProvider" : "Phpactor\\LanguageServerProtocol\\DocumentSymbolClientCapabilities",
      "codeActionProvider" : {
        "codeActionKinds" : [
          "quickfix"
        ]
      },
      "textDocumentSync" : 1
    }
  }
}

Any idea how I could possibly fix this? is this an issue on Nova’s side or the LSP’s?

Thanks
Emran

1 Like