Skip to content
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

Add streaming (partial results) support #395

Open
jheroy opened this issue Nov 28, 2024 · 10 comments · May be fixed by #510
Open

Add streaming (partial results) support #395

jheroy opened this issue Nov 28, 2024 · 10 comments · May be fixed by #510
Labels
backlog Likely not getting to it anytime soon feature New feature or request sources Specific source provider or the system as a whole

Comments

@jheroy
Copy link

jheroy commented Nov 28, 2024

Feature Description

Doc https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#partialResultParams
Why need this: golang/go#69631

@jheroy jheroy added the feature New feature or request label Nov 28, 2024
@Saghen Saghen added the sources Specific source provider or the system as a whole label Nov 28, 2024
@Saghen Saghen added this to the Sources v2 milestone Nov 28, 2024
@Saghen
Copy link
Owner

Saghen commented Dec 6, 2024

Do you know of any LSPs that support this? I'm looking for something I can test against

@stefanboca
Copy link
Collaborator

stefanboca commented Dec 6, 2024

It looks like haskell might based on a preliminary search?
https://grep.app/search?q=partialResultToken&filter[repo][0]=haskell/lsp
Although this might be from the lsp spec haskell package, not the lsp itself

Ada might as well
https://grep.app/search?q=partialResultToken&filter[repo][0]=AdaCore/ada_language_server

Or rosalyn for C#/dotnet/whatever
https://grep.app/search?q=partialResultToken&filter[repo][0]=dotnet/roslyn

@jheroy
Copy link
Author

jheroy commented Dec 8, 2024

Do you know of any LSPs that support this? I'm looking for something I can test against

gopls support this

@mikavilpas
Copy link
Contributor

Any idea how sorting results could be implemented? It seems like getting new results requires re-sorting all the results to get the correct sort order.

I guess it might be possible to batch the sorts at a specific interval, for example.

@stefanboca
Copy link
Collaborator

stefanboca commented Dec 8, 2024

Is it possible to insert results into the correct sorted position, thus always maintaining a correctly sorted list? I'm not sure how sorting is implemented, though, so this might be difficult, especially if the sorting algorithm isn't stable.

The insertions themselves could be batched at a specific interval to avoid repeatedly extending the list by one element.

Or maybe sorting could be done on the fly, as the completion window is scrolled? We only need as much of the list sorted as is visible. Although this might not be viable when wrapping around backwards from the top of the list to the bottom.

@Saghen Saghen mentioned this issue Dec 10, 2024
9 tasks
@Saghen
Copy link
Owner

Saghen commented Dec 10, 2024

gopls support this

It returns JSON RPC method not found: "Progress" not yet implemented so it seems like they don't support it on v0.16.2. Seems like roslyn doesn't support it either

@Saghen Saghen added the backlog Likely not getting to it anytime soon label Dec 10, 2024
@Saghen Saghen removed this from the Sources v2 milestone Dec 10, 2024
@Saghen
Copy link
Owner

Saghen commented Dec 10, 2024

Putting this into the backlog until I'm able to find an LSP that supports it

@xzbdmw
Copy link

xzbdmw commented Dec 12, 2024

I think clangd support partial results.

@mikavilpas
Copy link
Contributor

I did some research (mainly for myself, please ignore if not useful):

Ran a bit out of time right now, but I can maybe look at clangd and see if streaming is supported.

@Saghen
Copy link
Owner

Saghen commented Dec 12, 2024

Ahh, I misunderstood, it sounds like the server sends the notifications to the client directly. I'll take another peak

Edit: Still not able to find a server that supports it

@Saghen Saghen linked a pull request Dec 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Likely not getting to it anytime soon feature New feature or request sources Specific source provider or the system as a whole
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants