Skip to content

Commit a04d873

Browse files
committed
Update to latest GNATformat API
1 parent d943920 commit a04d873

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/ada/lsp-ada_documents.adb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- Language Server Protocol --
33
-- --
4-
-- Copyright (C) 2018-2023, AdaCore --
4+
-- Copyright (C) 2018-2025, AdaCore --
55
-- --
66
-- This is free software; you can redistribute it and/or modify it under --
77
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -21,6 +21,7 @@ with GNAT.Strings;
2121
with GNATCOLL.Traces;
2222
with GNATCOLL.VFS;
2323
with Gnatformat.Configuration;
24+
with Gnatformat.Edits;
2425
with Gnatformat.Formatting;
2526

2627
with Langkit_Support.Symbols;
@@ -1450,17 +1451,17 @@ package body LSP.Ada_Documents is
14501451

14511452
declare
14521453
Range_Formatted_Document :
1453-
constant Gnatformat.Formatting.Formatted_Edits :=
1454+
constant Gnatformat.Edits.Formatting_Edit_Type :=
14541455
Gnatformat.Formatting.Range_Format
14551456
(Self.Unit (Context),
14561457
Self.To_Source_Location_Range (Span),
14571458
Full_Options);
14581459

14591460
begin
14601461
return
1461-
(Self.To_A_Range (Range_Formatted_Document.Edit.Location),
1462+
(Self.To_A_Range (Range_Formatted_Document.Text_Edit.Location),
14621463
VSS.Strings.Conversions.To_Virtual_String
1463-
(Range_Formatted_Document.Edit.Text));
1464+
(Range_Formatted_Document.Text_Edit.Text));
14641465
end;
14651466
end Range_Format;
14661467

0 commit comments

Comments
 (0)