@@ -107,7 +107,7 @@ pub const Handler = struct {
107107 .@"utf-32" = > .@"utf-32" ,
108108 },
109109 .textDocumentSync = .{
110- .TextDocumentSyncOptions = .{
110+ .text_document_sync_options = .{
111111 .openClose = true ,
112112 .change = .Full ,
113113 },
@@ -163,7 +163,7 @@ pub const Handler = struct {
163163 pub fn @"textDocument/didOpen" (
164164 self : * Handler ,
165165 _ : std.mem.Allocator ,
166- notification : lsp.types.DidOpenTextDocumentParams ,
166+ notification : lsp.types.TextDocument.DidOpenParams ,
167167 ) ! void {
168168 std .log .debug ("Received 'textDocument/didOpen' notification" , .{});
169169
@@ -187,7 +187,7 @@ pub const Handler = struct {
187187 pub fn @"textDocument/didChange" (
188188 self : * Handler ,
189189 _ : std.mem.Allocator ,
190- notification : lsp.types.DidChangeTextDocumentParams ,
190+ notification : lsp.types.TextDocument.DidChangeParams ,
191191 ) ! void {
192192 std .log .debug ("Received 'textDocument/didChange' notification" , .{});
193193
@@ -203,11 +203,11 @@ pub const Handler = struct {
203203
204204 for (notification .contentChanges ) | content_change | {
205205 switch (content_change ) {
206- .literal_1 = > | change | {
206+ .text_document_content_change_whole_document = > | change | {
207207 buffer .clearRetainingCapacity ();
208208 try buffer .appendSlice (self .allocator , change .text );
209209 },
210- .literal_0 = > | change | {
210+ .text_document_content_change_partial = > | change | {
211211 const loc = lsp .offsets .rangeToLoc (buffer .items , change .range , self .offset_encoding );
212212 try buffer .replaceRange (self .allocator , loc .start , loc .end - loc .start , change .text );
213213 },
@@ -223,7 +223,7 @@ pub const Handler = struct {
223223 pub fn @"textDocument/didClose" (
224224 self : * Handler ,
225225 _ : std.mem.Allocator ,
226- notification : lsp.types.DidCloseTextDocumentParams ,
226+ notification : lsp.types.TextDocument.DidCloseParams ,
227227 ) ! void {
228228 std .log .debug ("Received 'textDocument/didClose' notification" , .{});
229229
@@ -241,7 +241,7 @@ pub const Handler = struct {
241241 pub fn @"textDocument/hover" (
242242 handler : * Handler ,
243243 _ : std.mem.Allocator ,
244- params : lsp.types.HoverParams ,
244+ params : lsp.types.Hover.Params ,
245245 ) ? lsp.types.Hover {
246246 std .log .debug ("Received 'textDocument/hover' request" , .{});
247247
@@ -253,7 +253,7 @@ pub const Handler = struct {
253253
254254 return .{
255255 .contents = .{
256- .MarkupContent = .{
256+ .markup_content = .{
257257 .kind = .plaintext ,
258258 .value = "I don't know what you are hovering over but I'd like to point out that you have a nice editor theme" ,
259259 },
@@ -264,8 +264,8 @@ pub const Handler = struct {
264264 pub fn @"textDocument/completion" (
265265 _ : * Handler ,
266266 arena : std.mem.Allocator ,
267- params : lsp.types.CompletionParams ,
268- ) error {OutOfMemory }! lsp .ResultType ( "textDocument/ completion" ) {
267+ params : lsp.types.completion.Params ,
268+ ) error {OutOfMemory }! ? lsp.types. completion.Result {
269269 std .log .debug ("Received 'textDocument/completion' notification" , .{});
270270
271271 if (params .context ) | context | {
@@ -275,7 +275,7 @@ pub const Handler = struct {
275275 });
276276 }
277277
278- const completions = try arena .dupe (lsp .types .CompletionItem , &.{
278+ const completions = try arena .dupe (lsp .types .completion . Item , &.{
279279 .{
280280 .label = "get" ,
281281 .detail = "get the value" ,
@@ -285,7 +285,7 @@ pub const Handler = struct {
285285 .detail = "set the value" ,
286286 },
287287 });
288- return .{ .array_of_CompletionItem = completions };
288+ return .{ .completion_items = completions };
289289 }
290290
291291 /// We received a response message from the client/editor.
0 commit comments