-
Notifications
You must be signed in to change notification settings - Fork 105
Fix language server not working with the latest beta #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…omething that exists on a TextDocumentSyncHandler.
…th the latest version)
private readonly IEnumerable<IHandlerMatcher> _handlerMatchers; | ||
|
||
public LspRequestRouter( | ||
IEnumerable<ILspHandlerDescriptor> collection, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was why descriptors could not be found with the latest beta... I need to add an integration test with the LanguageServer
for this at somepoint.
CancellationToken cancellationToken) | ||
{ | ||
return Task.FromResult(new Container<FoldingRange>(new FoldingRange() { | ||
StartLine = 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the folding range in the gif attached.
cc @mholo65 @TylerLeonhardt @tintoy |
Here are a few logs reference, you should see folding range in there. Initialize should not return any static features
Registration (this should contain the folding range registration)
then you should see some folding range content in the logs later
|
💯👌 Nice! |
This contains two fixes.
Also I've done a small refactor around
ITextDocumentIdentifier
previously this was only integrated inITextDocumentSyncHandler
, if you didn't register aITextDocumentSyncHandler
we would never catch any file registrations, because we would have way to identify a file.I have left
ITextDocumentIdentifier
as a member of theITextDocumentSyncHandler
interface but I have added the ability to add your ownITextDocumentIdentifier
instances, which will then be used when trying to identify files byUri
.