OmniSharp/csharp-language-server-protocol

NotImplementedException when trying to get document diagnostics

Opened this issue · 0 comments

I have the following code where I try to get document diagnostics from the language server and it always gives me a NotImplemented exception when I try to get it.

var report = await client.RequestDocumentDiagnostic(new DocumentDiagnosticParams()
{
    TextDocument = textDocument,
    Identifier = "luau"
});

Console.WriteLine(report);

error:

Unhandled exception. System.NotImplementedException: The method or operation is not implemented.
   at OmniSharp.Extensions.LanguageServer.Protocol.Models.RelatedDocumentDiagnosticReport.Converter.ReadJson(JsonReader reader, Type objectType, RelatedDocumentDiagnosticReport existingValue, Boolean hasExistingValue, JsonSerializer serializer)
   at Newtonsoft.Json.JsonConverter`1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
   at Newtonsoft.Json.Linq.JToken.ToObject[T](JsonSerializer jsonSerializer)
   at OmniSharp.Extensions.JsonRpc.ResponseRouter.ResponseRouterReturnsImpl.Returning[TResponse](CancellationToken cancellationToken)
   at OmniSharp.Extensions.LanguageServer.Protocol.Progress.ProgressManager.<>c__DisplayClass26_0`1.<<MakeRequest>b__0>d.MoveNext()