Skip to content

Drop diagnostics on callback if disabled#577

Merged
renkun-ken merged 1 commit intoREditorSupport:masterfrom
renkun-ken:drop-diagnostics
Oct 13, 2022
Merged

Drop diagnostics on callback if disabled#577
renkun-ken merged 1 commit intoREditorSupport:masterfrom
renkun-ken:drop-diagnostics

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