vim-lsc icon indicating copy to clipboard operation
vim-lsc copied to clipboard

Client seems to load, but does not work

Open stupid-genius opened this issue 3 years ago • 1 comments

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 avatar Jun 03 '21 22:06 stupid-genius

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

stupid-genius avatar Jun 04 '21 20:06 stupid-genius