Skip to content

Commit 64038a5

Browse files
author
mergerepo
committed
Merge remote branch 'origin/master' into edge
(no-precommit-check no-tn-check)
2 parents 02ad22c + 1cc4533 commit 64038a5

File tree

7 files changed

+271
-9
lines changed

7 files changed

+271
-9
lines changed

source/ada/lsp-ada_completions-names.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ package body LSP.Ada_Completions.Names is
171171
Completion_Count := Completion_Count + 1;
172172

173173
Names.Include
174-
(DN,
174+
(DN.P_Canonical_Part,
175175
(Is_Dot_Call (Item),
176176
Is_Visible (Item),
177177
Use_Snippets,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
project Default is
2+
end Default;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
procedure Main is
2+
3+
procedure Do_Something;
4+
5+
procedure Do_Something is
6+
begin
7+
null;
8+
end Do_Something;
9+
10+
begin
11+
Do_
12+
end Main;
Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
[
2+
{
3+
"comment": [
4+
"Check that we don't have both subprogram decls and bodies when ",
5+
"completing"
6+
]
7+
},
8+
{
9+
"start": {
10+
"cmd": [
11+
"${ALS}"
12+
]
13+
}
14+
},
15+
{
16+
"send": {
17+
"request": {
18+
"jsonrpc": "2.0",
19+
"id": 1,
20+
"method": "initialize",
21+
"params": {
22+
"processId": 100531,
23+
"rootUri": "$URI{.}",
24+
"capabilities": {
25+
"workspace": {
26+
"applyEdit": true,
27+
"workspaceEdit": {
28+
"documentChanges": true,
29+
"resourceOperations": [
30+
"rename"
31+
]
32+
}
33+
},
34+
"textDocument": {
35+
"synchronization": {},
36+
"completion": {
37+
"dynamicRegistration": true,
38+
"completionItem": {
39+
"snippetSupport": false,
40+
"documentationFormat": [
41+
"plaintext",
42+
"markdown"
43+
],
44+
"resolveSupport": {
45+
"properties": [
46+
"detail",
47+
"documentation"
48+
]
49+
}
50+
}
51+
},
52+
"hover": {},
53+
"signatureHelp": {},
54+
"declaration": {},
55+
"definition": {},
56+
"typeDefinition": {},
57+
"implementation": {},
58+
"documentSymbol": {
59+
"hierarchicalDocumentSymbolSupport": true
60+
},
61+
"formatting": {
62+
"dynamicRegistration": false
63+
},
64+
"rangeFormatting": {
65+
"dynamicRegistration": false
66+
},
67+
"onTypeFormatting": {
68+
"dynamicRegistration": false
69+
},
70+
"foldingRange": {
71+
"lineFoldingOnly": true
72+
}
73+
}
74+
}
75+
}
76+
},
77+
"wait": [
78+
{
79+
"id": 1,
80+
"result": {
81+
"capabilities": {
82+
"textDocumentSync": 2,
83+
"completionProvider": {
84+
"triggerCharacters": [
85+
".",
86+
",",
87+
"'",
88+
"("
89+
],
90+
"resolveProvider": true
91+
},
92+
"hoverProvider": true,
93+
"signatureHelpProvider": {
94+
"triggerCharacters": [
95+
",",
96+
"("
97+
],
98+
"retriggerCharacters": [
99+
"\b"
100+
]
101+
},
102+
"declarationProvider": true,
103+
"definitionProvider": true,
104+
"typeDefinitionProvider": true,
105+
"implementationProvider": true,
106+
"referencesProvider": true,
107+
"documentHighlightProvider": true,
108+
"documentSymbolProvider": true,
109+
"codeActionProvider": {},
110+
"documentFormattingProvider": true,
111+
"renameProvider": {},
112+
"foldingRangeProvider": true,
113+
"executeCommandProvider": {
114+
"commands": [
115+
"als-other-file",
116+
"als-named-parameters",
117+
"als-refactor-imports",
118+
"als-refactor-remove-parameters",
119+
"als-refactor-move-parameter",
120+
"als-refactor-change-parameter-mode",
121+
"als-suppress-separate"
122+
]
123+
},
124+
"workspaceSymbolProvider": true,
125+
"callHierarchyProvider": {},
126+
"alsShowDepsProvider": true,
127+
"alsReferenceKinds": [
128+
"reference",
129+
"access",
130+
"write",
131+
"call",
132+
"dispatching call",
133+
"parent",
134+
"child"
135+
]
136+
}
137+
}
138+
}
139+
]
140+
}
141+
},
142+
{
143+
"send": {
144+
"request": {
145+
"jsonrpc": "2.0",
146+
"method": "initialized"
147+
},
148+
"wait": []
149+
}
150+
},
151+
{
152+
"send": {
153+
"request": {
154+
"jsonrpc": "2.0",
155+
"method": "workspace/didChangeConfiguration",
156+
"params": {
157+
"settings": {
158+
"ada": {
159+
"scenarioVariables": {},
160+
"defaultCharset": "ISO-8859-1",
161+
"enableDiagnostics": true,
162+
"followSymlinks": false
163+
}
164+
}
165+
}
166+
},
167+
"wait": []
168+
}
169+
},
170+
{
171+
"send": {
172+
"request": {
173+
"jsonrpc": "2.0",
174+
"method": "textDocument/didOpen",
175+
"params": {
176+
"textDocument": {
177+
"uri": "$URI{main.adb}",
178+
"languageId": "Ada",
179+
"version": 0,
180+
"text": "procedure Main is\n \n procedure Do_Something;\n \n procedure Do_Something is\n begin\n null;\n end Do_Something;\n \nbegin\n Do_\nend Main;\n"
181+
}
182+
}
183+
},
184+
"wait": []
185+
}
186+
},
187+
{
188+
"send": {
189+
"request": {
190+
"jsonrpc": "2.0",
191+
"id": 6,
192+
"method": "textDocument/completion",
193+
"params": {
194+
"textDocument": {
195+
"uri": "$URI{main.adb}"
196+
},
197+
"position": {
198+
"line": 10,
199+
"character": 6
200+
}
201+
}
202+
},
203+
"wait": [
204+
{
205+
"id": 6,
206+
"result": {
207+
"isIncomplete": false,
208+
"items": [
209+
{
210+
"label": "Do_Something",
211+
"kind": 3,
212+
"sortText": "2Do_Something",
213+
"additionalTextEdits": [],
214+
"data": {
215+
"uri": "$URI{main.adb}",
216+
"range": {
217+
"start": {
218+
"line": 2,
219+
"character": 3
220+
},
221+
"end": {
222+
"line": 2,
223+
"character": 26
224+
}
225+
}
226+
}
227+
}
228+
]
229+
}
230+
}
231+
]
232+
}
233+
},
234+
{
235+
"send": {
236+
"request": {
237+
"jsonrpc": "2.0",
238+
"id": 8,
239+
"method": "shutdown"
240+
},
241+
"wait": [
242+
{
243+
"id": 8,
244+
"result": null
245+
}
246+
]
247+
}
248+
},
249+
{
250+
"stop": {
251+
"exit_code": 0
252+
}
253+
}
254+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: 'completion.duplicates'

testsuite/ada_lsp/completion.invisible.runtime/test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
}
154154
}
155155
},
156-
"waitFactor": "10",
156+
"waitFactor": "20",
157157
"wait": [
158158
{
159159
"jsonrpc": "2.0",

testsuite/ada_lsp/completion.no_snippet_for_params/test.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,6 @@
229229
"detail": "procedure Print_Integer (A : integer)",
230230
"documentation": "at main.adb (7:4)",
231231
"additionalTextEdits": []
232-
},
233-
{
234-
"label": "Print_Integer",
235-
"kind": 3,
236-
"detail": "procedure Print_Integer (A : integer)",
237-
"documentation": "at main.adb (9:4)",
238-
"additionalTextEdits": []
239232
}
240233
]
241234
}

0 commit comments

Comments
 (0)