-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'origin/master' into edge
- Loading branch information
Showing
27 changed files
with
2,303 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
------------------------------------------------------------------------------ | ||
-- Language Server Protocol -- | ||
-- -- | ||
-- Copyright (C) 2023, AdaCore -- | ||
-- -- | ||
-- This is free software; you can redistribute it and/or modify it under -- | ||
-- terms of the GNU General Public License as published by the Free Soft- -- | ||
-- ware Foundation; either version 3, or (at your option) any later ver- -- | ||
-- sion. This software is distributed in the hope that it will be useful, -- | ||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- | ||
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- | ||
-- License for more details. You should have received a copy of the GNU -- | ||
-- General Public License distributed with this software; see file -- | ||
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- | ||
-- of the license. -- | ||
------------------------------------------------------------------------------ | ||
|
||
pragma Ada_2022; | ||
|
||
with VSS.String_Vectors; | ||
|
||
with LSP.Structures.Unwrap; | ||
|
||
package body LSP.GPR_Client_Capabilities is | ||
|
||
---------------- | ||
-- Initialize -- | ||
---------------- | ||
|
||
procedure Initialize | ||
(Self : in out Client_Capability'Class; | ||
Value : LSP.Structures.InitializeParams) is | ||
begin | ||
Self.Value := Value; | ||
end Initialize; | ||
|
||
-------------------- | ||
-- Resolve_Lazily -- | ||
-------------------- | ||
|
||
function Resolve_Lazily (Self : Client_Capability'Class) return Boolean is | ||
use LSP.Structures.Unwrap; | ||
|
||
List : constant VSS.String_Vectors.Virtual_String_Vector := | ||
properties | ||
(resolveSupport | ||
(completionItem | ||
(completion | ||
(Self.Value.capabilities.textDocument)))); | ||
|
||
begin | ||
return List.Contains ("detail") and then List.Contains ("documentation"); | ||
end Resolve_Lazily; | ||
|
||
end LSP.GPR_Client_Capabilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
------------------------------------------------------------------------------ | ||
-- Language Server Protocol -- | ||
-- -- | ||
-- Copyright (C) 2023, AdaCore -- | ||
-- -- | ||
-- This is free software; you can redistribute it and/or modify it under -- | ||
-- terms of the GNU General Public License as published by the Free Soft- -- | ||
-- ware Foundation; either version 3, or (at your option) any later ver- -- | ||
-- sion. This software is distributed in the hope that it will be useful, -- | ||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- | ||
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- | ||
-- License for more details. You should have received a copy of the GNU -- | ||
-- General Public License distributed with this software; see file -- | ||
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- | ||
-- of the license. -- | ||
------------------------------------------------------------------------------ | ||
|
||
with LSP.Structures; | ||
|
||
package LSP.GPR_Client_Capabilities is | ||
|
||
type Client_Capability is tagged limited private; | ||
-- This type holds client initialization response and provides handy | ||
-- queries on the client capabilities | ||
|
||
procedure Initialize | ||
(Self : in out Client_Capability'Class; | ||
Value : LSP.Structures.InitializeParams); | ||
-- Save initialize parameters | ||
|
||
function Resolve_Lazily (Self : Client_Capability'Class) return Boolean; | ||
-- Returns True when resolve contains `documentation` and `details` | ||
|
||
private | ||
|
||
type Client_Capability is tagged limited record | ||
Value : LSP.Structures.InitializeParams; | ||
end record; | ||
|
||
end LSP.GPR_Client_Capabilities; |
Oops, something went wrong.