Skip to content

Markup message support push - #2318

Open
Marvin Brouwer (Marvin-Brouwer) wants to merge 8 commits into
microsoft:gh-pagesfrom
Marvin-Brouwer:markup-message-support-push
Open

Marvin Brouwer (Marvin-Brouwer) wants to merge 8 commits into
microsoft:gh-pagesfrom
Marvin-Brouwer:markup-message-support-push

Conversation

@Marvin-Brouwer

@Marvin-Brouwer Marvin Brouwer (Marvin-Brouwer) commented Sep 21, 2026 •

Copy link
Copy Markdown

Specification fix for microsoft/vscode-languageserver-node#1860.
Implementation: microsoft/vscode-languageserver-node#1861

3.18 added MarkupContent diagnostic messages, guarded by textDocument.diagnostic.markupMessageSupport.
The guarded message field is on Diagnostic, which both the push and pull models use, but the capability only exists on DiagnosticClientCapabilities.
So a push-only server has no way to negotiate it.

In #1860 Dirk Bäumer (@dbaeumer)'s preference was to mirror the property rather than reword the existing one:

"I would actually mirror it. Makes it easier to explain and evolve."

Targets 3.19 only.

Notes

  • I applied the metaModel changes as individual edits rather than copying the regenerated file
    (from Markup message support push vscode-languageserver-node#1861).
    The two copies already deviate on the main branches, so a wholesale copy would have pulled in unrelated changes.
  • Diagnostic.message now has two @since tags,
    so the generator emits since plus a sinceTags array, as it already does for TextDocumentEdit.edits.
  • Removes the @proposed tag from the pull capability in pullDiagnostics.md.
    It was marked proposed there, but 3.18.0 has shipped.

@Marvin-Brouwer

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

* in pull diagnostic messages.
*
* @since 3.18.0
* @proposed

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.

Actually 3.18.0 is not proposed anymore. I think it is an oversight and can be removed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Clear, I'll remove it, this also answers my question in the other thread

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

@@ -9052,8 +9052,12 @@
}

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.

Did you change the metaModel by hand or dio you generate it from the implementation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I generated it from the implementation, however, I did revert some additional changes that had nothing to do with mine

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I get a few of these for free when copying the metaModel from microsoft/vscode-languageserver-node:
Image

So I just revert these specific lines, happy to put them in if you want to

@dragondrmar-cmd

dragondrmar-cmd commented Sep 23, 2026 via email

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The code-action guidance incorrectly treats client capabilities as server capabilities.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Adds push-diagnostic negotiation for MarkupContent messages in LSP 3.19.

Changes:

  • Adds proposed push capability metadata.
  • Clarifies push versus pull diagnostic guards.
  • Updates generated meta-model data.
File Description
types/​diagnostic.md Documents transport-specific capability guards.
metaModel/​metaModel.json Mirrors updated protocol metadata.
language/​pullDiagnostics.md Clarifies pull capability scope.
language/​publishDiagnostics.md Adds the proposed push capability.
language/​codeAction.md Updates markup-message guidance.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +399 to +400
* and/or `textDocument.publishDiagnostics.markupMessageSupport` server capability
* before sending diagnostics with markup messages to a server.
@dbaeumer

Copy link
Copy Markdown
Member

Marvin Brouwer (@Marvin-Brouwer) see the copilot review comment which is actually correct. It is a client capability telling the server whether it can send markup content or not.

@Marvin-Brouwer

Copy link
Copy Markdown
Author

Marvin Brouwer (Marvin Brouwer (@Marvin-Brouwer)) see the copilot review comment which is actually correct. It is a client capability telling the server whether it can send markup content or not.

I see, so just to be sure I'm clear and we don't keep going back and forth.
The only thing really wrong here is: "it says server instead of client" is that correct?

And if yes, it seems the sentence becomes a bit strange because of "and textDocument.publishDiagnostics.markupMessageSupport client capabilities".

I suggest something like:

	/**
	 * Note that the client should check the `textDocument.diagnostic.markupMessageSupport`
	 * or `textDocument.publishDiagnostics.markupMessageSupport` client capabilities
	 * before sending diagnostics with markup messages to a server.
	 * Such diagnostics should be excluded for servers that don't support them.
	 */

Please confirm, or feel free to offer a suggestion and I'll just copy paste that.

This branch has not been deployed

No deployments
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.

4 participants