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

Drop diagnostics on callback if disabled #577

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Oct 13, 2022

Closes REditorSupport/vscode-R#1196

If the client opens a document before the language server receives settings from the client, diagnostics will be triggered (which is default). If diagnostics is disabled, diagnostics_callback will still publish the diagnostics results, which is undesirable.

This PR corrects this behavior by checking diagnostics settings again before publishing results. At this point, it is most likely for the server to have already received the settings from the client.

Copy link
Member

@randy3k randy3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

I think a new release is due and we should release an update.

@renkun-ken
Copy link
Member Author

Yes, agree.

@renkun-ken renkun-ken merged commit b5707dd into REditorSupport:master Oct 13, 2022
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.

r.lsp.diagnostics setting does not work
2 participants