Skip to content

Commit 67e45bd

Browse files
authored
Merge pull request #1075 from ahoppen/ahoppen/disable-syntactic-open-edit-options
Don’t request syntactic information from sourcekitd on open and edit
2 parents 74404ad + 8bd393a commit 67e45bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ extension SwiftLanguageServer {
345345
keys.request: self.requests.editorOpen,
346346
keys.name: note.textDocument.uri.pseudoPath,
347347
keys.sourceText: snapshot.text,
348+
keys.enableSyntaxMap: 0,
349+
keys.enableStructure: 0,
350+
keys.enableDiagnostics: 0,
348351
keys.syntacticOnly: 1,
349352
keys.compilerArgs: await self.buildSettings(for: snapshot.uri)?.compilerArgs as [SKDRequestValue]?,
350353
])
@@ -477,6 +480,9 @@ extension SwiftLanguageServer {
477480
let req = sourcekitd.dictionary([
478481
keys.request: self.requests.editorReplaceText,
479482
keys.name: note.textDocument.uri.pseudoPath,
483+
keys.enableSyntaxMap: 0,
484+
keys.enableStructure: 0,
485+
keys.enableDiagnostics: 0,
480486
keys.syntacticOnly: 1,
481487
keys.offset: edit.offset,
482488
keys.length: edit.length,

0 commit comments

Comments
 (0)