Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic-merge committed Oct 19, 2023
2 parents bbf2ee5 + c59023c commit 2359a87
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 40 deletions.
70 changes: 31 additions & 39 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/integration/vscode/ada/x64/linux/ada_language_server",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"type": "gdb",
"request": "launch",
"name": "Launch Program",
"target": ".obj/server/ada_language_server",
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText"
},
{
"name": "Launch Extension",
"name": "(vscode) Launch vscode with the Ada extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
Expand Down Expand Up @@ -67,15 +39,7 @@
}
},
{
"name": "Launch Extension Testsuite",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/integration/vscode/ada/",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test"]
},
{
"name": "General Testsuite",
"name": "(vscode) Run testsuite 'general'",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
Expand Down Expand Up @@ -109,7 +73,7 @@
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "GNATtest Integration Testsuite",
"name": "(vscode) Run testsuite 'gnattest'",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
Expand Down Expand Up @@ -142,6 +106,34 @@
"preLaunchTask": "npm: pretest",
// Switch to Debug Console to see test results
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "(npm) Launch all vscode tests with npm",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/integration/vscode/ada/",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test"]
},
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/integration/vscode/ada/x64/linux/ada_language_server",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
],
"inputs": [
Expand Down
17 changes: 16 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ The Ada Language Server (ALS) supports some features that are not in the officia
[Language Server Protocol](https://microsoft.github.io/language-server-protocol)
specification. This document specifies how these features are documented.

## Developing a custom feature

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).

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).

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.

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.

Here are some implementations of custom features in the ALS implemented through this mechanism:

* [Show Dependencies](../source/ada/lsp-ada_handlers-show_dependencies_commands.ads)
* [Other File](../source/ada/lsp-ada_handlers-other_file_commands.ads)

## Feature description document

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

## List of features
## List of custom features
* [Debug](debug.md)
* [Other File](other_file.md)
* [Reference kinds](reference_kinds.md)
Expand Down

0 comments on commit 2359a87

Please sign in to comment.