Skip to content

Commit

Permalink
Merge branch 'topic/fix_merge' into 'edge'
Browse files Browse the repository at this point in the history
Fix master->edge merge

See merge request eng/ide/ada_language_server!1646
  • Loading branch information
reznikmm committed Aug 1, 2024
2 parents b963eb2 + 07a7b68 commit f366015
Show file tree
Hide file tree
Showing 20 changed files with 3,982 additions and 5,177 deletions.
6 changes: 5 additions & 1 deletion source/gpr/lsp-gpr_completions.adb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ package body LSP.GPR_Completions is
Response : in out LSP.Structures.Completion_Result);
-- Handle completion when cursor after "package" keyword or after a project
-- reference.
-- If Unexisting_Only is returned, only the packages that have not been
-- defined in the given project file will be returned. Otherwise, only
-- the package that have been defined will be returned.

procedure Fill_Type_Completion_Response
(File : LSP.GPR_Files.File_Access;
Expand Down Expand Up @@ -242,8 +245,9 @@ package body LSP.GPR_Completions is
for Id of PRP.All_Packages loop
declare
Item : LSP.Structures.CompletionItem;
Exists_In_File : constant Boolean := File.In_Packages (Id);
begin
if (not File.In_Packages (Id) or else not Unexisting_Only)
if (Unexisting_Only xor Exists_In_File)
and then PRP.Is_Allowed_In (Id, Kind)
and then VSS.Strings.Starts_With
(To_Lower (VSS.Strings.To_Virtual_String
Expand Down
2 changes: 1 addition & 1 deletion source/gpr/lsp-gpr_handlers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ package body LSP.GPR_Handlers is
Capabilities.declarationProvider := LSP.Constants.True;
Capabilities.completionProvider :=
(Is_Set => True,
Value => (triggerCharacters => [" "],
Value => (triggerCharacters => [" ", ".", "'"],
resolveProvider => LSP.Constants.True,
others => <>));

Expand Down
Loading

0 comments on commit f366015

Please sign in to comment.