gtache / intellij-lsp

Plugin adding Language Server Protocol support for IntelliJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work with Bicep.LangServer.exe

MikeChristensen opened this issue · comments

Note: Also filed on JetBrains issue tracker, but resolved as Third Party Problem.

Environment: This is using Rider 2020.3.4 on Windows 10. LSP plugin verison is 1.6.1.

Repro:

  1. Unzip Bicep Language Server from bicepLanguageServer.zip (Also available by installing the Bicep VSCode Plugin if you don't trust random people attaching executables to GitHub tickets)
  2. Configure LSP Plugin to call Bicep.LangServer.exe:

image

  1. Open a .bicep file ( Like this one which has been renamed to .txt due to attachment restrictions)

Result:

Server immediately times out and does not connect. Just see a red dot. Nothing appears in bicep_err_xxxx.log. I've attached the bicep_out_xxx.log file: bicep_out_20210323.log

The process seems to start, and then immediately die. When I use this in other editors, the process stays alive. I don't think it's a timeout issue since I increased the "Init" timeout to 20s, but it fails immediately.

Expected:

Should connect to server.

Note: This language server is what VSCode uses for Bicep support. I've also gotten it working in Sublime Text, so I think the LSP server is correct. Not sure if there's a bug with the LSP plugin or if there's something configured incorrectly.

If it helps any, below is the log from my attempt... Looks like it started the server but it didn't respond.

From the Bicep LS code it's clearly expecting comms via stdin/stdout. Does intellij-lsp assume stdin/stdout by default?

Params: {
  "processId": null,
  "rootUri": "file:///L:/home/bburns/projects/qbs/",
  "capabilities": {
    "workspace": {
      "applyEdit": true,
      "workspaceEdit": {
        "documentChanges": true
      },
      "didChangeConfiguration": {},
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "symbol": {},
      "executeCommand": {},
      "workspaceFolders": false,
      "configuration": true
    },
    "textDocument": {
      "synchronization": {
        "willSave": true,
        "willSaveWaitUntil": true,
        "didSave": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true
        }
      },
      "hover": {},
      "signatureHelp": {},
      "references": {},
      "documentHighlight": {},
      "formatting": {},
      "rangeFormatting": {},
      "onTypeFormatting": {},
      "definition": {},
      "codeAction": {},
      "rename": {
        "prepareSupport": true,
        "dynamicRegistration": false
      },
      "semanticHighlightingCapabilities": {
        "semanticHighlighting": false
      }
    }
  }
}


[Trace - 10:51:45 AM] Sending request 'shutdown - (2)'
Params: null


[Trace - 10:51:45 AM] Received response 'shutdown - (2)' in 52ms
Result: null


[Trace - 10:52:13 AM] Sending request 'initialize - (1)'
Params: {
  "processId": null,
  "rootUri": "file:///L:/home/bburns/projects/qbs/",
  "capabilities": {
    "workspace": {
      "applyEdit": true,
      "workspaceEdit": {
        "documentChanges": true
      },
      "didChangeConfiguration": {},
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "symbol": {},
      "executeCommand": {},
      "workspaceFolders": false,
      "configuration": true
    },
    "textDocument": {
      "synchronization": {
        "willSave": true,
        "willSaveWaitUntil": true,
        "didSave": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true
        }
      },
      "hover": {},
      "signatureHelp": {},
      "references": {},
      "documentHighlight": {},
      "formatting": {},
      "rangeFormatting": {},
      "onTypeFormatting": {},
      "definition": {},
      "codeAction": {},
      "rename": {
        "prepareSupport": true,
        "dynamicRegistration": false
      },
      "semanticHighlightingCapabilities": {
        "semanticHighlighting": false
      }
    }
  }
}


[Trace - 10:52:13 AM] Sending request 'shutdown - (2)'
Params: null


[Trace - 10:52:31 AM] Sending request 'initialize - (1)'
Params: {
  "processId": null,
  "rootUri": "file:///L:/home/bburns/projects/qbs/",
  "capabilities": {
    "workspace": {
      "applyEdit": true,
      "workspaceEdit": {
        "documentChanges": true
      },
      "didChangeConfiguration": {},
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "symbol": {},
      "executeCommand": {},
      "workspaceFolders": false,
      "configuration": true
    },
    "textDocument": {
      "synchronization": {
        "willSave": true,
        "willSaveWaitUntil": true,
        "didSave": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true
        }
      },
      "hover": {},
      "signatureHelp": {},
      "references": {},
      "documentHighlight": {},
      "formatting": {},
      "rangeFormatting": {},
      "onTypeFormatting": {},
      "definition": {},
      "codeAction": {},
      "rename": {
        "prepareSupport": true,
        "dynamicRegistration": false
      },
      "semanticHighlightingCapabilities": {
        "semanticHighlighting": false
      }
    }
  }
}


[Trace - 10:52:38 AM] Sending request 'shutdown - (2)'
Params: null


[Trace - 10:52:38 AM] Received response 'shutdown - (2)' in 51ms
Result: null


[Trace - 10:52:49 AM] Sending request 'initialize - (1)'
Params: {
  "processId": null,
  "rootUri": "file:///L:/home/bburns/projects/qbs/",
  "capabilities": {
    "workspace": {
      "applyEdit": true,
      "workspaceEdit": {
        "documentChanges": true
      },
      "didChangeConfiguration": {},
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "symbol": {},
      "executeCommand": {},
      "workspaceFolders": false,
      "configuration": true
    },
    "textDocument": {
      "synchronization": {
        "willSave": true,
        "willSaveWaitUntil": true,
        "didSave": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true
        }
      },
      "hover": {},
      "signatureHelp": {},
      "references": {},
      "documentHighlight": {},
      "formatting": {},
      "rangeFormatting": {},
      "onTypeFormatting": {},
      "definition": {},
      "codeAction": {},
      "rename": {
        "prepareSupport": true,
        "dynamicRegistration": false
      },
      "semanticHighlightingCapabilities": {
        "semanticHighlighting": false
      }
    }
  }
}


[Trace - 10:52:49 AM] Sending request 'shutdown - (2)'
Params: null