Skip to content

Commit 93663d5

Browse files
authored
Merge pull request #1297 from ahoppen/endable-background-indexing-command-line-flag
Add a command-line option to enable background indexing
2 parents ca9c93b + eec5455 commit 93663d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/sourcekit-lsp/SourceKitLSP.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ struct SourceKitLSP: AsyncParsableCommand {
200200
)
201201
var completionMaxResults = 200
202202

203+
@Flag(
204+
help: "Enable background indexing. This feature is still under active development and may be incomplete."
205+
)
206+
var enableExperimentalBackgroundIndexing = false
207+
203208
func mapOptions() -> SourceKitLSPServer.Options {
204209
var serverOptions = SourceKitLSPServer.Options()
205210

@@ -215,6 +220,7 @@ struct SourceKitLSP: AsyncParsableCommand {
215220
serverOptions.indexOptions.indexStorePath = indexStorePath
216221
serverOptions.indexOptions.indexDatabasePath = indexDatabasePath
217222
serverOptions.indexOptions.indexPrefixMappings = indexPrefixMappings
223+
serverOptions.indexOptions.enableBackgroundIndexing = enableExperimentalBackgroundIndexing
218224
serverOptions.completionOptions.maxResults = completionMaxResults
219225
serverOptions.generatedInterfacesPath = generatedInterfacesPath
220226

0 commit comments

Comments
 (0)