File tree Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,24 @@ package body LSP.Ada_Client_Capabilities is
63
63
else False);
64
64
end Code_ActionLiteralSupport ;
65
65
66
+ -- -----------------------------
67
+ -- Completion_SnippetSupport --
68
+ -- -----------------------------
69
+
70
+ function Completion_SnippetSupport
71
+ (Self : Client_Capability'Class) return Boolean
72
+ is
73
+ use LSP.Structures.Unwrap;
74
+
75
+ Result : constant LSP.Structures.Boolean_Optional :=
76
+ snippetSupport
77
+ (completionItem
78
+ (completion
79
+ (Self.Value.capabilities.textDocument)));
80
+ begin
81
+ return (if Result.Is_Set then Result.Value else False);
82
+ end Completion_SnippetSupport ;
83
+
66
84
-- ---------------------------------------------
67
85
-- didChangeWatchedFiles_dynamicRegistration --
68
86
-- ---------------------------------------------
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ package LSP.Ada_Client_Capabilities is
75
75
(Self : Client_Capability'Class) return Boolean;
76
76
-- Returns textDocument.documentSymbol.hierarchicalDocumentSymbolSupport
77
77
78
+ function Completion_SnippetSupport
79
+ (Self : Client_Capability'Class) return Boolean;
80
+ -- Returns textDocument.completion.completionItem.snippetSupport
81
+
78
82
function didChangeWatchedFiles_dynamicRegistration
79
83
(Self : Client_Capability'Class) return Boolean;
80
84
-- Returns capabilities.workspace.didChangeWatchedFiles.dynamicRegistration
Original file line number Diff line number Diff line change @@ -1633,7 +1633,9 @@ package body LSP.Ada_Handlers is
1633
1633
LSP.Ada_Completions.Attributes.Attributes_Completion_Provider;
1634
1634
1635
1635
P5 : aliased LSP.Ada_Completions.Names.Name_Completion_Provider
1636
- (Self.Configuration.Use_Completion_Snippets);
1636
+ (Self.Configuration.Use_Completion_Snippets
1637
+ and then Self.Client.Completion_SnippetSupport);
1638
+
1637
1639
P6 : aliased LSP.Ada_Handlers.Invisibles.Invisible_Completion_Provider
1638
1640
(Self'Access , Context);
1639
1641
P7 : aliased
Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ package LSP.Structures.Unwrap is
44
44
return resolveSupport_OfWorkspaceSymbolClientCapabilities_Optional is
45
45
(if X.Is_Set then X.Value.resolveSupport else (Is_Set => False));
46
46
47
+ function snippetSupport
48
+ (X : completionItem_OfCompletionClientCapabilities_Optional)
49
+ return Boolean_Optional is
50
+ (if X.Is_Set then X.Value.snippetSupport else (Is_Set => False));
51
+
47
52
function properties
48
53
(X : resolveSupport_OfWorkspaceSymbolClientCapabilities_Optional)
49
54
return LSP.Structures.Virtual_String_Vector is
You can’t perform that action at this time.
0 commit comments