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

Better support when language server doesn't work #748

Open
angelozerr opened this issue Aug 8, 2023 · 2 comments
Open

Better support when language server doesn't work #748

angelozerr opened this issue Aug 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@angelozerr
Copy link
Contributor

LSP4E provides a great support for language server when it can start and when everything is working well, but when language server crashes or cannot be started,it is a very nightmare, because in short any operations tries again and again to start the language server and it freezes the Eclipse IDE.

Here a sample issue jbosstools/jbosstools-quarkus#235

In short, there is a problem with the Quarkus language server and there are several problems:

  • the first is that it freezes on each operations and Java editor (Quarkus language server is mapped to Java content type) freezes for any operations like hyperlink. The only solution for the user is to uninstall the plugin although the plugin provides another features than language server.
  • we have none overview about the problem (the language server can be sarted, on which operations is faiiling?)

On LSP4IJ (LSP support for IJ), I managed this usecase by disabling automaticly the language server (after 50 attempt of language server start). The LSP console shows that the language server is disabled and show the error stack trace. As we can see the server status, we can know that the problem comes from the start of language server. User can copy the start command to try it a shell command to investigate more the problem (One of problem for instance is that it starts the language server with a wron Java version runtime)

Here a demo with a language server which cannot be started:

LSPCrashOnStart

In this demo you can see:

  • stack trace error on LSP console
  • the server status which shows that after several attemps become disabled

User can choose too to disable it with Stop button

image

In other words:

  • there are no freeze if language server cannot start
  • user can choose to disable it (with LSP4E you have already implemented that by unchecking the language server)
  • LSP console shows the error message easily
@nimo23
Copy link

nimo23 commented Aug 11, 2023

A little off topic, but:

In #752 the CSS editor was completely unusable due to the connection error to the language server. I didn't know something like this could happen because I was used to using the Eclipse CSS editor without requiring a constant internet connection to connect to the language server, right? I'm afraid this will go even more in that direction, making Eclipse more and more dependent on the language server, which needs a constant internet connection. In order to at least limit this, it might be possible for the language server to keep the data in the cache even after an IDE restart, so that the available (already) API can be accessed here in the event of connection problems or such cases as here. Would it be possible to use the language server offline?

Another possibility, also comfortable, would be if there is an option where you can use the Language Server completely offline and update the API (and everything that the Language Server provides) manually. For example: The user downloads the "Language Server for CSS" and can use it afterwards without internet connection. If the user decides to update it, then the user can click the "update language server" button. I don't think it's ok to require the user of an IDE to have a permanent internet connection just to be able to use the code editor and send the code over the internet to the language server with every keypress.

@mickaelistria
Copy link
Contributor

Not performing more than N restarts (20, 50, ...) upon startup failure would be a welcome addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants