Skip to content

Commit 170368f

Browse files
committed
Stop pushing diagnostics to clients that support the pull model
1 parent 0b22b00 commit 170368f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • packages/tailwindcss-language-server/src

packages/tailwindcss-language-server/src/tw.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,11 @@ export class TW {
738738

739739
this.disposables.push(
740740
this.documentService.onDidChangeContent((change) => {
741+
// Don't push diagnostics to clients supporting the pull model
742+
if (this.initializeParams.capabilities.textDocument?.diagnostic) {
743+
return
744+
}
745+
741746
this.getProject(change.document)?.provideDiagnostics(change.document)
742747
}),
743748
)
@@ -850,6 +855,11 @@ export class TW {
850855
}
851856

852857
private refreshDiagnostics() {
858+
// Don't push diagnostics to clients supporting the pull model
859+
if (this.initializeParams.capabilities.textDocument?.diagnostic) {
860+
return
861+
}
862+
853863
for (let doc of this.documentService.getAllDocuments()) {
854864
let project = this.getProject(doc)
855865
if (project) {

0 commit comments

Comments
 (0)