mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-06-24 12:21:58 +02:00
83afc9d1e1
`CopiedFileMap` previously held methods like `workspaceEditAdjustedForCopiedFiles`, `callHierarchyItemAdjustedForCopiedFiles`, etc. that encoded knowledge of high-level LSP message types into `BuildServerIntegration`. Replace them with `adjusted(for:)` methods on each LSP type (`Location`, `[Location]`, `LocationsOrLocationLinksResponse`, `WorkspaceEdit`, `CallHierarchyItem`, `TypeHierarchyItem`) in a new `LSP+CopiedFileMap.swift` in the SourceKitLSP module. The primitive URI remapping is extracted into `CopiedFileMap.adjustedURI(for:)` which remains in `BuildServerIntegration`. `CallHierarchyItem.adjusted(for:)` also drops manual `LSPAny` dictionary construction in favour of `HierarchyItemData`.