-
Notifications
You must be signed in to change notification settings - Fork 354
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
Show progress during startup #92
Comments
I'm not sure what is
We can use |
Ah, I thought this was a standard lsp features but it looks like it's a custom addition by eclipse lsp? https://github.com/eclipse/eclipse.jdt.ls/blob/0bba050b76ea867564bd6221e78782bc69d09cfa/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JavaClientConnection.java#L39 I'll look it up better tomorrow. |
This is how it looks now in Atom: No details about indexing, it just starts spinning when initialization request is sent and stops when it gets a response. And it works even without I think that doing the same in VS Code client + implementing #85 will be enough: if you're wondering what exactly is happening, you can check logs. In VS Code there's a special panel for that, in Atom, unfortunately, it's still not implemented.. |
Ah right, without anything fancy, we could probably just use the |
@laughedelic I don't see the spinner in Atom, is that change on the plugin? |
I think it's OK to implement vscode specific functionality if it's valuable and not too much work. A progress bar would be super nice for example, it's one of thing I I'd otherwise miss from IntelliJ. |
The problem is that we need to define some custom message over the protocol to communicate the progress from the server to the client. The Java LSP seems to do just that. The editor-specific part is how to show the progress, but that's really tiny. |
This looks like it has at least some support from vscode team. Might be worth using until there is an official answer. microsoft/vscode-languageserver-node#261 |
@cquiroz Try pulling the master and running
As @gabro says, it's not so much about vscode specific functionality. LSP just doesn't support yet this concept of progress communication. I think we should wait for the linked microsoft/vscode-languageserver-node#261 (note, it's already a pull-request) instead of inventing conventions. I think if @gabro knows how to do #92 (comment), it's a good compromise solution for now, similar to what I shown in Atom. P.S. sorry, closed it accidentally |
After #332, actual indexing of project and dependency sources + semanticdb may be fast enough that it won't be necessary to report progress. The source file indexer processes ~800k loc/s. I think it's worth revisiting this however once we have a bsp client that triggers compile in the build tool to report batch compilation progress in the build tool. |
Hi, LSP now supports progress report via |
Hey @pca006132 we actually have a feature request for this here: scalameta/metals-feature-requests#125. We have a couple different custom LSP extension that we use in instead of progress to enable us to do a few more things, but it is a good idea to default to progress when the client doesn't support |
Essentially this:
This can leverage the LSP notifications of type "status". The LS will send a notification indicating the status (Starting, Started, Error) and a message.
Each specific editor can decide how to show this message. The example in the GIF above is a mocked implementation in VSCode.
The Java LSP does it exactly like this:
The text was updated successfully, but these errors were encountered: