text
stringlengths
0
234
---------------------------
procedure Read_InitializeParams
(S : access Ada.Streams.Root_Stream_Type'Class;
V : out InitializeParams)
is
use type League.Strings.Universal_String;
JS : League.JSON.Streams.JSON_Stream'Class renames
League.JSON.Streams.JSON_Stream'Class (S.all);
Trace : LSP.Types.Optional_String;
begin
JS.Start_Object;
Read_Optional_Number (JS, +"processId", V.processId);
Read_String (JS, +"rootPath", V.rootPath);
Read_IRI (JS, +"rootUri", V.rootUri);
JS.Key (+"capabilities");
LSP.Messages.ClientCapabilities'Read (S, V.capabilities);
Read_Optional_String (JS, +"trace", Trace);
if not Trace.Is_Set then
V.trace := LSP.Types.Unspecified;
elsif Trace.Value = +"off" then
V.trace := LSP.Types.Off;
elsif Trace.Value = +"messages" then
V.trace := LSP.Types.Messages;
elsif Trace.Value = +"verbose" then
V.trace := LSP.Types.Verbose;
end if;
JS.End_Object;
end Read_InitializeParams;
--------------------------
-- Read_synchronization --
--------------------------
not overriding procedure Read_synchronization
(S : access Ada.Streams.Root_Stream_Type'Class;
V : out synchronization)
is
JS : League.JSON.Streams.JSON_Stream'Class renames
League.JSON.Streams.JSON_Stream'Class (S.all);
begin
JS.Start_Object;
Read_Optional_Boolean
(JS, +"dynamicRegistration", V.dynamicRegistration);
Read_Optional_Boolean (JS, +"willSave", V.willSave);
Read_Optional_Boolean (JS, +"willSaveWaitUntil", V.willSaveWaitUntil);
Read_Optional_Boolean (JS, +"didSave", V.didSave);
JS.End_Object;
end Read_synchronization;
-----------------------------------------
-- Read_TextDocumentClientCapabilities --
-----------------------------------------
not overriding procedure Read_TextDocumentClientCapabilities
(S : access Ada.Streams.Root_Stream_Type'Class;
V : out TextDocumentClientCapabilities)
is
JS : League.JSON.Streams.JSON_Stream'Class renames
League.JSON.Streams.JSON_Stream'Class (S.all);
begin
JS.Start_Object;
JS.Key (+"synchronization");
synchronization'Read (S, V.synchronization);
JS.Key (+"completion");
completion'Read (S, V.completion);
JS.Key (+"hover");
dynamicRegistration'Read (S, V.hover);
JS.Key (+"signatureHelp");
dynamicRegistration'Read (S, V.signatureHelp);
JS.Key (+"references");
dynamicRegistration'Read (S, V.references);
JS.Key (+"documentHighlight");
dynamicRegistration'Read (S, V.documentHighlight);
JS.Key (+"documentSymbol");
dynamicRegistration'Read (S, V.documentSymbol);
JS.Key (+"formatting");
dynamicRegistration'Read (S, V.formatting);
JS.Key (+"rangeFormatting");
dynamicRegistration'Read (S, V.rangeFormatting);
JS.Key (+"onTypeFormatting");
dynamicRegistration'Read (S, V.onTypeFormatting);
JS.Key (+"definition");
dynamicRegistration'Read (S, V.definition);
JS.Key (+"codeAction");
dynamicRegistration'Read (S, V.codeAction);
JS.Key (+"codeLens");
dynamicRegistration'Read (S, V.codeLens);
JS.Key (+"documentLink");
dynamicRegistration'Read (S, V.documentLink);
JS.Key (+"rename");
dynamicRegistration'Read (S, V.rename);
JS.End_Object;
end Read_TextDocumentClientCapabilities;
-----------------------------------------
-- Read_TextDocumentContentChangeEvent --
-----------------------------------------