Skip to content

Drop diagnostics on callback if disabled - #577

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

renkun-ken merged 1 commit into
REditorSupport:masterfrom
renkun-ken:drop-diagnostics

Conversation

@renkun-ken

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

Copy link
Copy Markdown
Member

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.

@randy3k randy3k left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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