Skip to content

Commit e6ef371

Browse files
committed
Decode locale
1 parent e8c930d commit e6ef371

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Sources/LanguageServerProtocol/Requests/InitializeRequest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ extension InitializeRequest: Codable {
111111
private enum CodingKeys: String, CodingKey {
112112
case processId
113113
case clientInfo
114+
case locale
114115
case rootPath
115116
case rootURI = "rootUri"
116117
case initializationOptions

Tests/LanguageServerProtocolJSONRPCTests/CodingTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import XCTest
1818
final class CodingTests: XCTestCase {
1919

2020
func testMessageCoding() {
21-
checkMessageCoding(InitializeRequest(processId: 1, clientInfo: InitializeRequest.ClientInfo(name: "dummy-client", version: "1.0"), rootPath: "/foo", rootURI: nil, initializationOptions: nil, capabilities: ClientCapabilities(workspace: nil, textDocument: nil), trace: .off, workspaceFolders: nil), id: .number(2), json: """
21+
checkMessageCoding(InitializeRequest(processId: 1, clientInfo: InitializeRequest.ClientInfo(name: "dummy-client", version: "1.0"), locale: "en-US", rootPath: "/foo", rootURI: nil, initializationOptions: nil, capabilities: ClientCapabilities(workspace: nil, textDocument: nil), trace: .off, workspaceFolders: nil), id: .number(2), json: """
2222
{
2323
"id" : 2,
2424
"jsonrpc" : "2.0",
@@ -31,6 +31,7 @@ final class CodingTests: XCTestCase {
3131
"name" : "dummy-client",
3232
"version" : "1.0"
3333
},
34+
"locale" : "en-US",
3435
"processId" : 1,
3536
"rootPath" : "\\/foo",
3637
"trace" : "off"

0 commit comments

Comments
 (0)