1001 Commits

Author SHA1 Message Date
Andry Ogorodnik
962fd84621 V628-024 Symbol diff has been added 2022-07-19 18:35:18 +03:00
Joao Azevedo
926dd8c91b UB30-006 Fix To_LSP_Range for a whole file selection
Check if Segment.Start_Line or Segment.End_Line are the last line of
the Document. If so, adjust the last character iterator accordingly.
2022-07-15 13:17:29 +01:00
Anthony Leonardo Gracio
6a31cc2acc V624-007: Fix memory leak on server finalization 2022-07-08 15:52:07 +02:00
Adrien Boulanger
0bee292d43 V704-034: Limit number of logs in $ALS_HOME/.als
Add logThreshold property to limit the number of logs.
2022-07-08 15:05:32 +02:00
Adrien Boulanger
9bde2dc184 V628-012: Improve highlighter robustness
Fix "Basic decl having multiple defining names" property errors.
Add generic exception handler and log the error when
ALS.HIGHIGHTERS.DEBUG is active.

Add simple test.
2022-07-07 10:49:17 +02:00
Anthony Leonardo Gracio
0bcd113bc8 V705-026: Compute predefined types' completion doc immediately
When computing completion items' details, compute the documentation
immediately for predefined types (e.g: Integer) since the standard
package does not correspond to any actual URI.

This fixes an exception on the completionItem/resolve request, where
we are trying to retrieve a node from an URI and a SLOC which
does not actually exist.

Add an automatic test.
2022-07-06 12:08:52 +02:00
Anthony Leonardo Gracio
cf9783fe19 V624-007: Fix memory leaks in lsp-ada_handlers.adb 2022-07-01 12:19:22 +02:00
Adrien Boulanger
3703f6b272 V603-013: Rewrite parameter completion
Introduce generic package for parameter completion.
Add support type for parameter completion.
Support aggregate via parameter completion.

Add tests
Adapt tests
2022-06-29 17:53:36 +02:00
Anthony Leonardo Gracio
567d5b406f UB25-027: Add a custom request to list source directories
Allowing the extension to query them in order to add them to the workspace
if not already present.

This allows to search for files that come from imported projects that might
not be under the workspace root directory.

This works only for importing non-externally built source directories
for the moment.
2022-06-24 15:54:53 +02:00
Anthony Leonardo Gracio
9bc738eab6 V614-021: Use completion weight in sortText
In order to place items with an higher weight at the
top of the completion window.
2022-06-20 17:35:19 +02:00
Joao Azevedo
9b709e3d43 Update laltools imported packages 2022-06-13 18:52:19 +01:00
Joao Azevedo
a7028019f3 Adjust Format_Vector call to new API 2022-06-13 18:52:19 +01:00
Laurent Thévenoux
c3a6032c62 Do not call p_canonical_type for aggregate completion
This patch removes the call to `p_canonical_type` when looking for
aggregate completions. This call seems useless and can leads to a
property error exception when an incomplete type is involved in the
completion.

TN: V225-032
2022-06-13 18:52:19 +01:00
Anthony Leonardo Gracio
4b5ec95d07 V609-058: Always disable snippets when not supported by client 2022-06-10 17:31:13 +02:00
Anthony Leonardo Gracio
49f0ef914c V609-058: Add useCompletionSnippets flag
And an associated VS Code preference, disabled by default.
2022-06-10 10:08:30 +02:00
Maxim Reznik
b93bd59506 Allow more complex sorting in LSP tests.
Extend `sortReply` to work with keys nested in objects
inside JSON array. With this sort complex reply JSON to have
more stable tests.

For instance

```json
"sortReply": {"result": {"range": {"start": "line"}}}
```

will sort `result` JSON array using `X.range.start.line` as
a sorting key, where `X` is an array item.

Allow integer JSON values as sorting keys also.
2022-06-07 19:11:28 +03:00
Anthony Leonardo Gracio
b37053ba0c V223-056: Fix aggregate snippet indexes generation
And add an automatic test for this.
2022-06-03 17:25:10 +02:00
Vadim Godunko
aed193dfb1 V331-019 Remove direct use of GNATdoc's Structured_Comment. 2022-05-23 15:38:54 +03:00
Vadim Godunko
9ba4da3015 V331-019 Reflect move of extractor options. 2022-05-23 15:38:54 +03:00
Nicolas Setton
4169bcb95a V516-040 Add defensive programming on Get_Open_Document
This adds defensive programming in some cases where
Get_Open_Document is called and the result is expected
to be non-null. Traces these in the log and abandon the
request, rather than crashing with Constraint_Error.
2022-05-17 10:08:04 +01:00
Vadim Godunko
41378ae603 V331-019 Use GNATdoc to display documentation for record's memebers 2022-05-12 17:18:10 +03:00
Vadim Godunko
6f9d097ccd V331-019 Use GNATdoc to process documentation for record types. 2022-05-12 17:18:10 +03:00
Maxim Reznik
e322a7a064 U908-034 Implement semantic token range request 2022-05-11 16:20:21 +03:00
Maxim Reznik
2c22be75cb U908-034 Add semantic token range request stubs 2022-05-11 16:20:21 +03:00
Vadim Godunko
9d95aeb27a V331-019 Specify 'plaintext' as format of the documentation.
Otherwise VS Code parse it as 'markdown', while GNAT Studio process it
as 'plaintext'.
2022-05-04 20:28:36 +03:00