Skip to content
Discussion options

You must be logged in to vote

Hey @luiz290788,

so the easiest way to accomplish this is by simply sending a JSON-RPC notification from the language server to the language client. The language services contain a connection object at services.shared.lsp.Connection, which you can use like this:

// language server/webworker
services.shared.workspace.DocumentBuilder.onBuildPhase(DocumentState.Validated, documents => {
  services.shared.lsp.Connection.sendNotification('validated', /** some data */);
});

// language client/monaco
client.onNotification('validated', someData => {
  // Do whatever you want with the data
});

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@luiz290788
Comment options

Answer selected by luiz290788
Comment options

You must be logged in to vote
3 replies
@luiz290788
Comment options

@montymxb
Comment options

montymxb Feb 3, 2023
Collaborator

@msujew
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants