mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Thread Language through FileBuildSettings NFC
Will make it easier to work with cached settings.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
|
||||
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
@@ -171,7 +171,10 @@ extension BuildServerBuildSystem: BuildSystem {
|
||||
|
||||
public func settings(for uri: DocumentURI, _ language: Language) -> FileBuildSettings? {
|
||||
if let response = try? self.buildServer?.sendSync(SourceKitOptions(uri: uri)) {
|
||||
return FileBuildSettings(compilerArguments: response.options, workingDirectory: response.workingDirectory)
|
||||
return FileBuildSettings(
|
||||
compilerArguments: response.options,
|
||||
workingDirectory: response.workingDirectory,
|
||||
language: language)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user