Skip to content

Add a command-line option to enable background indexing #1297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/sourcekit-lsp/SourceKitLSP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ struct SourceKitLSP: AsyncParsableCommand {
)
var completionMaxResults = 200

@Flag(
help: "Enable background indexing. This feature is still under active development and may be incomplete."
)
var enableExperimentalBackgroundIndexing = false

func mapOptions() -> SourceKitLSPServer.Options {
var serverOptions = SourceKitLSPServer.Options()

Expand All @@ -215,6 +220,7 @@ struct SourceKitLSP: AsyncParsableCommand {
serverOptions.indexOptions.indexStorePath = indexStorePath
serverOptions.indexOptions.indexDatabasePath = indexDatabasePath
serverOptions.indexOptions.indexPrefixMappings = indexPrefixMappings
serverOptions.indexOptions.enableBackgroundIndexing = enableExperimentalBackgroundIndexing
serverOptions.completionOptions.maxResults = completionMaxResults
serverOptions.generatedInterfacesPath = generatedInterfacesPath

Expand Down