Skip to content

Commit ebe8761

Browse files
Allow workspaceSymbols request on empty strings
The performance optimization should be done on client-side when the requests is trigerred by the user itself, like VS Code does. Othwerwise we should allow the request on empty strings as the LSP spec suggests: this is used by some clients (e.g: Helix) to retrieve all the workspaces symbols at once. For eng/ide/ada_language_server#1391
1 parent c5e87be commit ebe8761

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

source/ada/lsp-ada_handlers.adb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,7 +3459,6 @@ package body LSP.Ada_Handlers is
34593459
is
34603460
use type Ada.Containers.Count_Type;
34613461
use type LSP.Search.Search_Kind;
3462-
use type VSS.Strings.Character_Count;
34633462

34643463
procedure Send_Partial_Response;
34653464

@@ -3537,17 +3536,6 @@ package body LSP.Ada_Handlers is
35373536
Response : LSP.Structures.Symbol_Result (LSP.Structures.Variant_1);
35383537

35393538
begin
3540-
if Pattern.Get_Kind /= LSP.Enumerations.Start_Word_Text
3541-
and then Pattern.Get_Canonical_Pattern.Character_Length < 2
3542-
then
3543-
-- Do not process too small pattern because
3544-
-- this produces a huge response that is useless
3545-
-- and costs a while.
3546-
3547-
Self.Sender.On_Symbol_Response (Id, Response);
3548-
return;
3549-
end if;
3550-
35513539
for Context of Self.Contexts.Each_Context loop
35523540
Context.Get_Any_Symbol
35533541
(Pattern => Pattern,

0 commit comments

Comments
 (0)