Skip to content

Commit f366015

Browse files
committed
Merge branch 'topic/fix_merge' into 'edge'
Fix master->edge merge See merge request eng/ide/ada_language_server!1646
2 parents b963eb2 + 07a7b68 commit f366015

File tree

20 files changed

+3982
-5177
lines changed

20 files changed

+3982
-5177
lines changed

source/gpr/lsp-gpr_completions.adb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ package body LSP.GPR_Completions is
6666
Response : in out LSP.Structures.Completion_Result);
6767
-- Handle completion when cursor after "package" keyword or after a project
6868
-- reference.
69+
-- If Unexisting_Only is returned, only the packages that have not been
70+
-- defined in the given project file will be returned. Otherwise, only
71+
-- the package that have been defined will be returned.
6972

7073
procedure Fill_Type_Completion_Response
7174
(File : LSP.GPR_Files.File_Access;
@@ -242,8 +245,9 @@ package body LSP.GPR_Completions is
242245
for Id of PRP.All_Packages loop
243246
declare
244247
Item : LSP.Structures.CompletionItem;
248+
Exists_In_File : constant Boolean := File.In_Packages (Id);
245249
begin
246-
if (not File.In_Packages (Id) or else not Unexisting_Only)
250+
if (Unexisting_Only xor Exists_In_File)
247251
and then PRP.Is_Allowed_In (Id, Kind)
248252
and then VSS.Strings.Starts_With
249253
(To_Lower (VSS.Strings.To_Virtual_String

source/gpr/lsp-gpr_handlers.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ package body LSP.GPR_Handlers is
380380
Capabilities.declarationProvider := LSP.Constants.True;
381381
Capabilities.completionProvider :=
382382
(Is_Set => True,
383-
Value => (triggerCharacters => [" "],
383+
Value => (triggerCharacters => [" ", ".", "'"],
384384
resolveProvider => LSP.Constants.True,
385385
others => <>));
386386

0 commit comments

Comments
 (0)