sourcegraph / javascript-typescript-langserver

JavaScript and TypeScript code intelligence through the Language Server Protocol

Home Page:https://sourcegraph.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

signatureHelp always return empty replies

humanitiesNerd opened this issue · comments

I'm using Emacs Eglot and I have a single .js file

The signatureHelp requests from the client are always replied to with empty replies

Not so with hover requests, they get filled replies

Here's an example

client-request (id:10) Wed Dec 26 16:07:29 2018:
(:jsonrpc "2.0" :id 10 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///home/catonano/Progetti/albo/savedata.js")
	   :position
	   (:line 32 :character 6)))

server-reply (id:10) Wed Dec 26 16:07:30 2018:
(:jsonrpc "2.0" :id 10 :result
	  (:signatures
	   []
	   :activeParameter 0 :activeSignature 0))


client-request (id:11) Wed Dec 26 16:07:29 2018:
(:jsonrpc "2.0" :id 11 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///home/catonano/Progetti/albo/savedata.js")
	   :position
	   (:line 32 :character 6)))


server-reply (id:11) Wed Dec 26 16:07:30 2018:
(:jsonrpc "2.0" :id 11 :result
	  (:contents
	   [(:language "typescript" :value "const insertTable: (mydata: any) => void")
	    "**const**"]
	   :range
	   (:start
	    (:line 32 :character 6)
	    :end
	    (:line 32 :character 17))))

This happens when, with the cursor, I hover onto this function

const insertTable = (mydata) => {
    const queryText = "INSERT INTO films (id, titolo) VALUES ($1, $2)";        
    const values = [
        1,
        mydata
    ];
    pool.query(queryText, values)
	.then((res) => {
            pool.end();
        })
        .catch((err) => {
	    console.log(err);
            pool.end();
        });
}

I installed the server with

npm install -g

Do I need to configure anything ?

Or is this expected ?

Thanks