Skip to content

Conversation

@davidanthoff
Copy link

This is an attempt to improve the situation described in microsoft/language-server-protocol#946.

Be warned: I really don't know what I'm doing here. These diffs look plausible to me, but I have really no idea. I also don't know how to try the code in this repo, so as far as I can tell this compiles, but beyond that I haven't tested it :)

@dbaeumer
Copy link
Member

We should never change the position of a request since the sender of the request might not be aware of this. All we can do is to reject the request if the position is outside the document range. And now that I think about this it should may be not be something that goes into the LSP libs right away since I never heard about such a problem. @davidanthoff have you tried to handle this in a custom middleware on your end to see what is actually the cause of this?

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Jun 11, 2020
@davidanthoff
Copy link
Author

No, I haven't tried that. Is there some pointer how I might be able to add custom middleware?

@rcjsuen
Copy link
Contributor

rcjsuen commented Jun 11, 2020

Is there some pointer how I might be able to add custom middleware?

@davidanthoff Maybe #322 and #628 can help?

@davidanthoff
Copy link
Author

Yes, those pointers were super helpful!

I've added diagnostic code now in our extension (see julia-vscode/julia-vscode#1333), lets see what we get from that. I'll report back if we find anything interesting.

Thanks for the help! I'll close this PR here, the middleware route is clearly better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

info-needed Issue requires more information from poster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants