You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Contributor Documentation/LSP Extensions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -396,7 +396,7 @@ New request that returns structured location information for a list of exact sym
396
396
Unlike the standard `workspace/symbol` request (which accepts a fuzzy query string), this request takes exact names — typically obtained from `sourcekit/workspace/symbolNames` — and returns all index occurrences for each name across every workspace.
397
397
398
398
For each name the response contains zero or more `WorkspaceSymbolItem` values:
399
-
- Source-file symbols carry a `SymbolInformation` with a `file://` URI and the exact 0-based line/column.
399
+
- Source-file symbols carry a `SymbolInformation` with a `file://` URI and the exact position.
400
400
-SDK/stdlibsymbolscarrya`WorkspaceSymbol`with`location: .uri(...)`pointingatthe`file://`URIofthe`.swiftinterface`or`.swiftmodule`file, withthefully-qualifiedmodulenameasa`?module=`queryparameter. Thesymbol's USR is stored in `data["usr"]`. Call `workspaceSymbol/resolve` to obtain the exact `Location` within the generated interface. The client must advertise `workspace.symbol.resolveSupport`; without it, the raw `file://` URI is returned as `SymbolInformation` instead.
1.**Discovery** — fetch all names; client filters locally.
130
130
2.**Resolution** — send matching name(s) to populate the search result list; server returns symbol details (kind, container name, location) for display.
131
-
- Source symbols: `SymbolInformation` with a `file://` URI and exact 0-based line/column. No further steps required.
131
+
- Source symbols: `SymbolInformation` with a `file://` URI and exact position. No further steps required.
132
132
- SDK/stdlib symbols: `WorkspaceSymbol` with `location: .uri(file:// URL?module=...)` pointing to the module file and the USR in `data["usr"]`, when the client advertises `workspace.symbol.resolveSupport`. Otherwise falls back to `SymbolInformation` with the raw `file://` URI.
133
133
3.**Location resolution** — call `workspaceSymbol/resolve` with the selected `WorkspaceSymbol` to open the generated interface and resolve the symbol position. The server synthesizes the final `sourcekit-lsp://` URI and fills in `location.range`.
134
134
4.**Content retrieval** — fetch the generated interface text. The editor scrolls to `location.range.start` from the resolve step.
0 commit comments