mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Query build system of workspaces to determine best workspace to open a file in
This sets the stage for multi-workspace support. Everything should be handled internally, we are just missing the API to actually open multiple workspaces at this point.
This commit is contained in:
@@ -187,6 +187,19 @@ extension CompilationDatabaseBuildSystem: BuildSystem {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func fileHandlingCapability(for uri: DocumentURI) -> FileHandlingCapability {
|
||||
guard let fileUrl = uri.fileURL else {
|
||||
return .unhandled
|
||||
}
|
||||
return queue.sync {
|
||||
if database(for: fileUrl) != nil {
|
||||
return .handled
|
||||
} else {
|
||||
return .unhandled
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension CompilationDatabaseBuildSystem {
|
||||
|
||||
Reference in New Issue
Block a user