Skip to content

Commit

Permalink
Add extra docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hegyibalint committed Aug 21, 2024
1 parent 8e8c399 commit fa36dfa
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class DeclarativeTextDocumentService : TextDocumentService, LanguageClientAware

private fun processDocument(uri: URI) = withDom(uri) { dom ->
reportSyntaxErrors(uri, dom)
reportSemanticErrors(uri, dom)
}

/**
Expand All @@ -143,12 +144,20 @@ class DeclarativeTextDocumentService : TextDocumentService, LanguageClientAware
client.publishDiagnostics(
PublishDiagnosticsParams(
uri.toString(),
// Can be empty, which means that we have no errors
// Can be empty, which means to the client that there are no diagnostics (i.e. errors, warnings, etc.)
// Otherwise, the client won't clear the previously sent diagnostic
diagnostics
)
)
}

/**
* Publishes the semantic errors (or the lack thereof) for the given document as LSP diagnostics.
*/
private fun reportSemanticErrors(uri: URI, dom: DocumentOverlayResult) {

}

// Utility and other member functions ------------------------------------------------------------------------------

private fun parse(uri: URI, text: String): DocumentOverlayResult {
Expand Down

0 comments on commit fa36dfa

Please sign in to comment.