Skip to content

Commit 2e4d68d

Browse files
committed
Update LanguageClient to 0.8.2
1 parent 0393ce7 commit 2e4d68d

File tree

4 files changed

+25
-90
lines changed

4 files changed

+25
-90
lines changed

CodeEdit.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@
16561656
repositoryURL = "https://github.com/ChimeHQ/LanguageClient";
16571657
requirement = {
16581658
kind = upToNextMajorVersion;
1659-
minimumVersion = 0.8.0;
1659+
minimumVersion = 0.8.2;
16601660
};
16611661
};
16621662
303E88462C276FD600EEA8D9 /* XCRemoteSwiftPackageReference "LanguageServerProtocol" */ = {

CodeEdit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CodeEdit/Features/LSP/LanguageServer/DataChannel+localProcess.swift

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

CodeEdit/Features/LSP/LanguageServer/LanguageServer.swift

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,22 @@ class LanguageServer<DocumentType: LanguageServerDocument> {
8686
environment: binary.env
8787
)
8888

89-
let (pid, connection) = try makeLocalServerConnection(languageId: languageId, executionParams: executionParams)
89+
let (connection, process) = try makeLocalServerConnection(
90+
languageId: languageId,
91+
executionParams: executionParams
92+
)
9093
let server = InitializingServer(
9194
server: connection,
9295
initializeParamsProvider: getInitParams(workspacePath: workspacePath)
9396
)
94-
let capabilities = try await server.initializeIfNeeded()
97+
let initializationResponse = try await server.initializeIfNeeded()
98+
9599
return LanguageServer(
96100
languageId: languageId,
97101
binary: binary,
98102
lspInstance: server,
99-
lspPid: pid,
100-
serverCapabilities: capabilities,
103+
lspPid: process.processIdentifier,
104+
serverCapabilities: initializationResponse.capabilities,
101105
rootPath: URL(filePath: workspacePath)
102106
)
103107
}
@@ -112,15 +116,15 @@ class LanguageServer<DocumentType: LanguageServerDocument> {
112116
static func makeLocalServerConnection(
113117
languageId: LanguageIdentifier,
114118
executionParams: Process.ExecutionParameters
115-
) throws -> (pid: pid_t, connection: JSONRPCServerConnection) {
119+
) throws -> (connection: JSONRPCServerConnection, process: Process) {
116120
do {
117-
let (pid, channel) = try DataChannel.localProcessChannel(
121+
let (channel, process) = try DataChannel.localProcessChannel(
118122
parameters: executionParams,
119123
terminationHandler: {
120124
logger.debug("Terminated data channel for \(languageId.rawValue)")
121125
}
122126
)
123-
return (pid, JSONRPCServerConnection(dataChannel: channel))
127+
return (JSONRPCServerConnection(dataChannel: channel), process)
124128
} catch {
125129
logger.warning("Failed to initialize data channel for \(languageId.rawValue)")
126130
throw error

0 commit comments

Comments
 (0)