Skip to content

Commit 7828e2b

Browse files
committed
Move workspace symbol implementation out of SourceKitLSPServer
The `workspace/symbol`, `workspace/symbolNames`, `workspace/symbolInfo` and `workspaceSymbol/resolve` implementations made up roughly 470 lines of SourceKitLSPServer.swift. Move them to WorkspaceSymbols.swift and leave each request handler in SourceKitLSPServer.swift as a single statement that forwards to its implementation. Fold QualifiedWorkspaceSymbolQuery.swift into the same file, since the query type and its fuzzy matching helper are only used by the qualified `workspace/symbol` search path. Also remove `languageClass(for:)`, whose last caller went away when language service instances became scoped per workspace.
1 parent c86a006 commit 7828e2b

4 files changed

Lines changed: 566 additions & 546 deletions

File tree

Sources/SourceKitLSP/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ add_library(SourceKitLSP STATIC
1919
MessageMetadata.swift
2020
OnDiskDocumentManager.swift
2121
PlaygroundDiscovery.swift
22-
QualifiedWorkspaceSymbolQuery.swift
2322
ReferenceDocumentURL.swift
2423
Rename.swift
2524
SemanticTokensLegend+SourceKitLSPLegend.swift
@@ -32,6 +31,7 @@ add_library(SourceKitLSP STATIC
3231
TestDiscovery.swift
3332
TextEdit+IsNoop.swift
3433
Workspace.swift
34+
WorkspaceSymbols.swift
3535
)
3636
set_target_properties(SourceKitLSP PROPERTIES
3737
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}

Sources/SourceKitLSP/QualifiedWorkspaceSymbolQuery.swift

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)