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

feat: toggle show diagnostics without server restart #2429

Closed
wants to merge 2 commits into from

Conversation

ta946
Copy link

@ta946 ta946 commented Mar 5, 2024

referencing #2161 (comment)

Introduce the ability to toggle the display of diagnostics without restarting the server

LSP-pyright's output can be quite distracting when trying to read the code to understand it before making changes.

Current method to hide the output, setting show_diagnostics_severity_level to 0, causes the server to restart which can take quite a while with lsp-pyright. Which can be very frustrating and slows down development.

Even worse is that there is no indication that the server is still starting up, so i have to wait longer to make sure there are no errors as opposed to the server still starting up

How it works is by caching the latest diagnostic information. When toggled off, it removes the regions, and when toggled on again, it re-adds the regions by mimicking that new diagnostic information was received

This PR is more a low-quality proof of concept as I don't know the LSP code-base enough nor whats required to contribute correctly

@rchl
Copy link
Member

rchl commented Mar 5, 2024

Thanks for the work but I think it would make sense to just create a feature request for it rather than a pull request that is not really done properly.

@ta946
Copy link
Author

ta946 commented Mar 5, 2024

not sure how to show file changes in a feature request so will just close the pr as that other issue is already open

@ta946 ta946 closed this Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants