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

[validation] changing the preferences while language server is not around doesn't have any effect #836

Closed
martinlippert opened this issue Sep 8, 2022 · 4 comments

Comments

@martinlippert
Copy link
Member

I am looking at the following case:

  • I start the language server, it runs the validation, and adds a bunch of warnings/errors on my source files (all great)
  • I close all the editors, the errors and warnings stay around (makes sense)
  • The language server is shutdown being the scenes, the errors and warnings stay around (makes sense, too)
  • I open the preferences and switch the errors/warnings off because I want to get rid of them - BUT THIS DOESN'T REMOVE OR CHANGE THE EXISTING ERRORS/WARNINGS. They stay around.

The reason for this is obvious (the language server is not running to take the new preferences into account and update the errors/warnings). When I startup the language server, it reconciles everything and the errors/warnings are gone (for my case described above).

But it might probably not make a lot of sense to the user that the errors/warnings wait for the language server to kick-in before they get removed (due to my changed preferences).

@martinlippert
Copy link
Member Author

If we keep the language server around even if no editor is open, that would solve this (as a side effect), but I am still not fully convinced that we should keep the language server running all the time.

Another solution would be to start a language server if the preferences for validations get changed and no language server is running, so that those changes can take effect (under the hood).

@BoykoAlex
Copy link
Contributor

@martinlippert what about removing validations that came from LS when the LS is shut down?

@martinlippert
Copy link
Member Author

@BoykoAlex I think that makes sense.

@BoykoAlex
Copy link
Contributor

Validation are removed if LS is shutting down with 35f4e98
Therefore, this concern should be addressed. If LS is down there won't be any validations from LS left on the client

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

No branches or pull requests

2 participants