You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set up a LanguageServer having a custom DefinitionHandler.
This handler currently features a DefinitionRegistrationOptions config object with a DocumentSelector set to null (it's just still the default - I'll define it soon).
When trying to start the LanguageServer in one of my tests, it just didn't want to fully initialize.
I manually stepped through LanguageServer code to find out what's throwing an exception there.
Turns out, it's an NullPointerException in TextDocumentHandler.GetHandler:
There might be a ? missing in the second clause, as it's evaluating said second expression as soon as registrationOptions is not null - but DocumentSelector might be.
My code was:
public DDefinitionHandler(ProgressManager progressManager)
: base(new DefinitionRegistrationOptions(), progressManager)
{
}
Thanks for your project!
The text was updated successfully, but these errors were encountered:
I think you might be right, it's very possible the registrations options is null in that scenario. After this next big change I'll look at adding that in.
Hey there,
I'm trying to set up a LanguageServer having a custom DefinitionHandler.
This handler currently features a DefinitionRegistrationOptions config object with a DocumentSelector set to null (it's just still the default - I'll define it soon).
When trying to start the LanguageServer in one of my tests, it just didn't want to fully initialize.
I manually stepped through LanguageServer code to find out what's throwing an exception there.
Turns out, it's an NullPointerException in
TextDocumentHandler.GetHandler
:csharp-language-server-protocol/src/Server/Matchers/TextDocumentMatcher.cs
Line 82 in 79b1056
There might be a
?
missing in the second clause, as it's evaluating said second expression as soon as registrationOptions is not null - but DocumentSelector might be.My code was:
Thanks for your project!
The text was updated successfully, but these errors were encountered: