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

Make LSP always publish diagnostics #3397

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Make LSP always publish diagnostics #3397

merged 2 commits into from
Oct 11, 2024

Conversation

mcy
Copy link
Member

@mcy mcy commented Oct 11, 2024

This change makes it so that the LSP publishes diagnostics on refresh regardless of whether there are any diagnostics to publish. This is necessary, because if there are currently N diagnostics displayed for the current file, we need to explicitly set them to zero on some clients, such as VSCode, when the user updates the file to be syntactically/semantically correct.

In other words, not doing this results in red squiggles that don't go away after fixing the issue.

@mcy mcy requested review from bufdev and doriable October 11, 2024 16:48
Copy link
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 11, 2024, 4:50 PM

@mcy mcy merged commit 1a7712f into main Oct 11, 2024
12 checks passed
@mcy mcy deleted the mcy/lsp-always-publish branch October 11, 2024 17:59
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.

3 participants