Skip to content

Commit 2359a87

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents bbf2ee5 + c59023c commit 2359a87

File tree

2 files changed

+47
-40
lines changed

2 files changed

+47
-40
lines changed

.vscode/launch.json

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,7 @@
44
"version": "0.2.0",
55
"configurations": [
66
{
7-
"name": "(gdb) Attach",
8-
"type": "cppdbg",
9-
"request": "attach",
10-
"program": "${workspaceFolder}/integration/vscode/ada/x64/linux/ada_language_server",
11-
"processId": "${command:pickProcess}",
12-
"MIMode": "gdb",
13-
"setupCommands": [
14-
{
15-
"description": "Enable pretty-printing for gdb",
16-
"text": "-enable-pretty-printing",
17-
"ignoreFailures": true
18-
},
19-
{
20-
"description": "Set Disassembly Flavor to Intel",
21-
"text": "-gdb-set disassembly-flavor intel",
22-
"ignoreFailures": true
23-
}
24-
]
25-
},
26-
{
27-
"type": "gdb",
28-
"request": "launch",
29-
"name": "Launch Program",
30-
"target": ".obj/server/ada_language_server",
31-
"cwd": "${workspaceRoot}",
32-
"valuesFormatting": "parseText"
33-
},
34-
{
35-
"name": "Launch Extension",
7+
"name": "(vscode) Launch vscode with the Ada extension",
368
"type": "extensionHost",
379
"request": "launch",
3810
"runtimeExecutable": "${execPath}",
@@ -67,15 +39,7 @@
6739
}
6840
},
6941
{
70-
"name": "Launch Extension Testsuite",
71-
"type": "node",
72-
"request": "launch",
73-
"cwd": "${workspaceFolder}/integration/vscode/ada/",
74-
"runtimeExecutable": "npm",
75-
"runtimeArgs": ["run-script", "test"]
76-
},
77-
{
78-
"name": "General Testsuite",
42+
"name": "(vscode) Run testsuite 'general'",
7943
"type": "extensionHost",
8044
"request": "launch",
8145
"runtimeExecutable": "${execPath}",
@@ -109,7 +73,7 @@
10973
"internalConsoleOptions": "openOnSessionStart"
11074
},
11175
{
112-
"name": "GNATtest Integration Testsuite",
76+
"name": "(vscode) Run testsuite 'gnattest'",
11377
"type": "extensionHost",
11478
"request": "launch",
11579
"runtimeExecutable": "${execPath}",
@@ -142,6 +106,34 @@
142106
"preLaunchTask": "npm: pretest",
143107
// Switch to Debug Console to see test results
144108
"internalConsoleOptions": "openOnSessionStart"
109+
},
110+
{
111+
"name": "(npm) Launch all vscode tests with npm",
112+
"type": "node",
113+
"request": "launch",
114+
"cwd": "${workspaceFolder}/integration/vscode/ada/",
115+
"runtimeExecutable": "npm",
116+
"runtimeArgs": ["run-script", "test"]
117+
},
118+
{
119+
"name": "(gdb) Attach",
120+
"type": "cppdbg",
121+
"request": "attach",
122+
"program": "${workspaceFolder}/integration/vscode/ada/x64/linux/ada_language_server",
123+
"processId": "${command:pickProcess}",
124+
"MIMode": "gdb",
125+
"setupCommands": [
126+
{
127+
"description": "Enable pretty-printing for gdb",
128+
"text": "-enable-pretty-printing",
129+
"ignoreFailures": true
130+
},
131+
{
132+
"description": "Set Disassembly Flavor to Intel",
133+
"text": "-gdb-set disassembly-flavor intel",
134+
"ignoreFailures": true
135+
}
136+
]
145137
}
146138
],
147139
"inputs": [

doc/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ The Ada Language Server (ALS) supports some features that are not in the officia
66
[Language Server Protocol](https://microsoft.github.io/language-server-protocol)
77
specification. This document specifies how these features are documented.
88

9+
## Developing a custom feature
10+
11+
Usually we tend to implement custom features through [LSP commands](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#command). These commands can then be executed by the LSP clients running the ALS (e.g: VS Code).
12+
13+
Commands can either do something on the codebase directly (e.g: refactorings) or be used to query specific information (e.g: return all the function declarations within a scope).
14+
15+
Commands can be directly accessible to users through [LSP codeActions](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction). This is the case for all ALS-specific refactorings.
16+
17+
You can also use custom commands to perform queries on the code base, to develop an IDD-specific tool integration on top of the ALS for instance. In that case you can directly execute the command via the [LSP workspace/executeCommand](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_executeCommand) request and use the command's results as you want.
18+
19+
Here are some implementations of custom features in the ALS implemented through this mechanism:
20+
21+
* [Show Dependencies](../source/ada/lsp-ada_handlers-show_dependencies_commands.ads)
22+
* [Other File](../source/ada/lsp-ada_handlers-other_file_commands.ads)
23+
924
## Feature description document
1025

1126
Each feature is described in a dedicated Markdown document.
@@ -39,7 +54,7 @@ It includes TypeScript definitions, as the official specification does.
3954
This section includes related feature description documents and links to others
4055
related resources.
4156

42-
## List of features
57+
## List of custom features
4358
* [Debug](debug.md)
4459
* [Other File](other_file.md)
4560
* [Reference kinds](reference_kinds.md)

0 commit comments

Comments
 (0)