Skip to content

Commit 0cc6c51

Browse files
committed
诊断改为同步代码
1 parent d1a536f commit 0cc6c51

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

EmmyLua-LS/src/main/kotlin/com/tang/vscode/LuaTextDocumentService.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,14 +1071,12 @@ class LuaTextDocumentService(private val workspace: LuaWorkspaceService) : TextD
10711071

10721072
override fun diagnostic(params: DocumentDiagnosticParams): CompletableFuture<DocumentDiagnosticReport> {
10731073
val file = workspace.findFile(params.textDocument.uri)
1074-
return computeAsync { checker ->
1075-
if (file is ILuaFile) {
1076-
val report = workspace.diagnoseFile(file, params.previousResultId, checker)
1077-
report
1078-
} else {
1079-
val report = DocumentDiagnosticReport(RelatedUnchangedDocumentDiagnosticReport())
1080-
report
1081-
}
1074+
return if (file is ILuaFile) {
1075+
val report = workspace.diagnoseFile(file, params.previousResultId, null)
1076+
CompletableFuture.completedFuture(report)
1077+
} else {
1078+
val report = DocumentDiagnosticReport(RelatedUnchangedDocumentDiagnosticReport())
1079+
CompletableFuture.completedFuture(report)
10821080
}
10831081
}
10841082

0 commit comments

Comments
 (0)