Skip to content

receiving null results #216

@nalbion

Description

@nalbion

I'm running some tests on my application which uses various LSPs, and the tests are passing for several other languages, but not C#.

The test runs on a very simple code base of 2 .cs files, a .sln and a .csproj file.

Could somebody please explain why all of the results come back as null?

Main.cs

using MyProject;

class Program
{
    static void Main(string[] args)
    {
        MyClass.DisplayMessage();       // line 7
    }
}

(For clarity, I've omited "jsonrpc": "2.0" from each message)

->  { 
  "id": 1,
  "method": "initialize", 
  "params": {
     "capabilities: {...}, 
    "processId":41527,
    "rootPath":"/my-project",
    "rootUri":"file:///my-project"
  }
}

<- {"method": "window/showMessage", "params":{"type":3,"message":"csharp-ls: initializing, version 0.16.0.0"}}
<- {"method":"window/showMessage","params":{"type":3,"message":"csharp-ls: csharp-ls is released under MIT license and is not affiliated with Microsoft Corp.; see https://github.com/razzmatazz/csharp-language-server"}}

<- {
  "id":1,
  "result":{
    "capabilities":{
      "textDocumentSync":{
        "openClose":true,
        ...

-> {"method":"initialized","params":null}

(my project only has 2 files, but several seconds pass by)

-> {
  "id":2,
  "method":"csharp/metadata",
  "params":{
    "textDocument":{
      "uri":"file:///my-project/Main.cs"
    }
  }
}

<- {"id":2,"result":null}

-> {
  "id":3,
  "method":"textDocument/definition",
  "params":{
    "textDocument":{
      "uri":"file:///my-project/Main.cs"
    },
    "position":{
      "line":6,"character":8
    }
  }
}

<- {"id":3,"result":null}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions