Skip to content

Commit 9088e67

Browse files
committed
A few miscellaneous changes
1 parent 8d0af97 commit 9088e67

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Sources/SourceKitLSP/Swift/CursorInfo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct CursorInfo {
7575
// FIXME: we need to convert the utf8/utf16 column, which may require reading the file!
7676
utf16index: column - 1
7777
)
78-
location = Location(uri: DocumentURI(URL(fileURLWithPath: filepath)), range: Range(position))
78+
location = Location(uri: DocumentURI(filePath: filepath, isDirectory: false), range: Range(position))
7979
} else {
8080
location = nil
8181
}
@@ -134,7 +134,7 @@ extension SwiftLanguageService {
134134
/// USR, and declaration location. This request does minimal processing of the result.
135135
///
136136
/// - Parameters:
137-
/// - url: Document URL in which to perform the request. Must be an open document.
137+
/// - url: Document URI in which to perform the request. Must be an open document.
138138
/// - range: The position range within the document to lookup the symbol at.
139139
/// - completion: Completion block to asynchronously receive the CursorInfo, or error.
140140
func cursorInfo(

Sources/SourceKitLSP/Swift/SemanticRefactoring.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct SemanticRefactoring {
3333
/// - Parameters:
3434
/// - title: The title of the refactoring action.
3535
/// - dict: Response dictionary to extract information from.
36-
/// - url: The client URL that triggered the `semantic_refactoring` request.
36+
/// - snapshot: The snapshot that triggered the `semantic_refactoring` request.
3737
/// - keys: The sourcekitd key set to use for looking up into `dict`.
3838
init?(_ title: String, _ dict: SKDResponseDictionary, _ snapshot: DocumentSnapshot, _ keys: sourcekitd_api_keys) {
3939
guard let categorizedEdits: SKDResponseArray = dict[keys.categorizedEdits] else {
@@ -108,9 +108,7 @@ extension SwiftLanguageService {
108108
/// Wraps the information returned by sourcekitd's `semantic_refactoring` request, such as the necessary edits and placeholder locations.
109109
///
110110
/// - Parameters:
111-
/// - url: Document URL in which to perform the request. Must be an open document.
112-
/// - command: The semantic refactor `Command` that triggered this request.
113-
/// - completion: Completion block to asynchronously receive the SemanticRefactoring data, or error.
111+
/// - refactorCommand: The semantic refactor `Command` that triggered this request.
114112
func semanticRefactoring(
115113
_ refactorCommand: SemanticRefactorCommand
116114
) async throws -> SemanticRefactoring {

Sources/SourceKitLSP/Workspace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public final class Workspace: Sendable {
140140
}
141141
}
142142

143-
/// Creates a workspace for a given root `URL`, inferring the `ExternalWorkspace` if possible.
143+
/// Creates a workspace for a given root `DocumentURI`, inferring the `ExternalWorkspace` if possible.
144144
///
145145
/// - Parameters:
146146
/// - url: The root directory of the workspace, which must be a valid path.

0 commit comments

Comments
 (0)