Skip to content

Commit c920341

Browse files
authored
Revert "perf: use DocumentUtil.executeInBulk for formatting (#184)" (#208)
This reverts commit 4cbd08d.
1 parent 3c8bf32 commit c920341

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/kotlin/com/github/biomejs/intellijbiome/services/BiomeServerService.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import com.intellij.platform.lsp.api.LspServerManager
1919
import com.intellij.platform.lsp.api.customization.LspIntentionAction
2020
import com.intellij.platform.lsp.util.getLsp4jRange
2121
import com.intellij.platform.lsp.util.getRangeInDocument
22-
import com.intellij.util.DocumentUtil
2322
import com.intellij.util.LineSeparator
2423
import org.eclipse.lsp4j.*
2524
import java.util.*
@@ -56,6 +55,10 @@ class BiomeServerService(private val project: Project) {
5655
LspServerManager.getInstance(project).stopAndRestartIfNeeded(BiomeLspServerSupportProvider::class.java)
5756
}
5857

58+
fun stopBiomeServer() {
59+
LspServerManager.getInstance(project).stopServers(BiomeLspServerSupportProvider::class.java)
60+
}
61+
5962
suspend fun executeFeatures(document: Document,
6063
features: EnumSet<Feature>) {
6164
val manager = FileDocumentManager.getInstance()
@@ -162,7 +165,7 @@ class BiomeServerService(private val project: Project) {
162165
}
163166

164167
WriteCommandAction.runWriteCommandAction(project, commandName, groupId, {
165-
DocumentUtil.executeInBulk(document, formattingAction)
168+
formattingAction.run()
166169
})
167170
}
168171
}

0 commit comments

Comments
 (0)