Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client seems to load, but does not work #425

Open
stupid-genius opened this issue Jun 3, 2021 · 1 comment
Open

Client seems to load, but does not work #425

stupid-genius opened this issue Jun 3, 2021 · 1 comment

Comments

@stupid-genius
Copy link

I'm trying to get a JavaScript LSP server running with this. I've tried this one and this one, but I can't get either of them to work with vim-lsc. (I'm pretty sure I have gotten one to work in the past, so I know it was possible at one point)

.vimrc

let g:lsc_server_commands = {'javascript': 'ts-lsp-test.sh'}

ts-lsp-test.sh

#!/bin/bash

node ~/.vim/bin/javascript-typescript-langserver/lib/language-server-stdio 2>&1 > ~/ts-lsp.log

ts-lsp.log

$ cat ts-lsp.log | sed -n '1,2!p' | jq
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "capabilities": {
      "textDocumentSync": 1,
      "hoverProvider": true,
      "signatureHelpProvider": {
        "triggerCharacters": [
          "(",
          ","
        ]
      },
      "definitionProvider": true,
      "typeDefinitionProvider": true,
      "referencesProvider": true,
      "documentSymbolProvider": true,
      "workspaceSymbolProvider": true,
      "xworkspaceReferencesProvider": true,
      "xdefinitionProvider": true,
      "xdependenciesProvider": true,
      "completionProvider": {
        "resolveProvider": true,
        "triggerCharacters": [
          "."
        ]
      },
      "codeActionProvider": true,
      "renameProvider": true,
      "executeCommandProvider": {
        "commands": []
      },
      "xpackagesProvider": true
    }
  }
}
$ cat ts-lsp.log | sed -n '5p' | jq
{
  "jsonrpc": "2.0",
  "method": "window/logMessage",
  "params": {
    "type": 4,
    "message": "Found package file:///XXX/package.json"
  }
}

But it doesn't appear to work. Occurrence highlighting doesn't work and when I press gr vim prints

[lsc:Error] Failed to call textDocument/references
[lsc:Error] Server status: starting
@stupid-genius
Copy link
Author

This happens on both Ubuntu 20.04 and on Windows in git bash. The behavior is identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant