{"id":13409545,"url":"https://github.com/AdaCore/ada_language_server","last_synced_at":"2025-03-14T14:31:41.199Z","repository":{"id":37270460,"uuid":"90789594","full_name":"AdaCore/ada_language_server","owner":"AdaCore","description":"Server implementing the Microsoft Language Protocol for Ada and SPARK","archived":false,"fork":false,"pushed_at":"2025-03-07T11:20:56.000Z","size":15768,"stargazers_count":252,"open_issues_count":47,"forks_count":63,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-03-07T12:27:18.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdaCore.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-09T20:37:20.000Z","updated_at":"2025-03-07T11:21:02.000Z","dependencies_parsed_at":"2023-12-20T15:46:31.092Z","dependency_job_id":"80709748-8d51-4b70-8bbe-893b05633efa","html_url":"https://github.com/AdaCore/ada_language_server","commit_stats":null,"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2Fada_language_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2Fada_language_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2Fada_language_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2Fada_language_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdaCore","download_url":"https://codeload.github.com/AdaCore/ada_language_server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243593495,"owners_count":20316196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:01.835Z","updated_at":"2025-03-14T14:31:36.184Z","avatar_url":"https://github.com/AdaCore.png","language":"Ada","funding_links":[],"categories":["Libraries","Ada","Languages"],"sub_categories":["Algorithms, Containers and Protocols"],"readme":"\n# Ada Language Server\n\n[![Build binaries](https://github.com/AdaCore/ada_language_server/workflows/Build%20binaries/badge.svg)](https://github.com/AdaCore/ada_language_server/actions)\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/AdaCore/ada_language_server)](https://github.com/AdaCore/ada_language_server/releases)\n[![VS Marketplace](https://img.shields.io/visual-studio-marketplace/v/adacore.ada?label=VS%20Marketplace)](https://marketplace.visualstudio.com/items?itemName=AdaCore.ada)\n[![Open VSX Registry](https://img.shields.io/open-vsx/v/AdaCore/ada?label=Open%20VSX)](https://open-vsx.org/extension/AdaCore/ada)\n[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/AdaCore/ada_language_server/tree/edge)\n\nThis repository contains an implementation of the [Microsoft Language Server Protocol](https://microsoft.github.io/language-server-protocol/)\nfor Ada/SPARK and GPR project files.\n\nCurrent features (general):\n\n* [GNAT project files](https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/gnat_project_manager.html) support.\n* Basic [Alire](https://alire.ada.dev/) support.\n\nFor Ada/SPARK, we provide the following:\n\n* Code completion for names, keywords, aggregates, etc.\n* Code navigation, such as Go to Definition/Declaration, Find All References, Call Hierarchies, etc.\n* [Code refactoring](#refactoring-tools) like insert named associations, auto-add `with`-clauses, etc.\n* Document/Workspace symbol search.\n* Code folding and formatting.\n\nThe Ada Language Server now also supports the GPR language, via the\n`--language-gpr` option, providing support for the most used LSP features\nsuch as navigation, outline and tooltips for GPR files. When this switch is\npresent, the server will only support GPR files. To support both GPR and\nAda/SPARK, you'll need to launch two instances of the server.\nYou can refer to the [Supported LSP Server Requests](#supported-lsp-server-requests)\nsection for more information.\n\nWe also provide [Visual Studio Code](https://code.visualstudio.com/)\nextension at\n[the VS Marketplace](https://marketplace.visualstudio.com/items?itemName=AdaCore.ada) and at\n[the Open VSX Registry](https://open-vsx.org/extension/AdaCore/ada).\n\n## Table of Contents\n\n- [Ada Language Server](#ada-language-server)\n  - [Table of Contents](#table-of-contents)\n  - [Install](#install)\n    - [Dependencies](#dependencies)\n  - [Usage](#usage)\n    - [Memory Consumption](#memory-consumption)\n  - [Supported LSP Server Requests](#supported-lsp-server-requests)\n    - [Protocol Extensions](#protocol-extensions)\n  - [VS Code Extension](#vs-code-extension)\n    - [Getting Started](#getting-started)\n    - [Configuration](#configuration)\n    - [Refactoring](#refactoring)\n    - [Tasks](#tasks)\n      - [Task Customization](#task-customization)\n      - [Tasks for Project Mains](#tasks-for-project-mains)\n      - [GNATtest Support](#gnattest-support)\n      - [ALIRE Support](#alire-support)\n    - [Commands and Shortcuts](#commands-and-shortcuts)\n      - [Ada: Go to other file](#ada-go-to-other-file)\n      - [Ada: Add subprogram box](#ada-add-subprogram-box)\n      - [Ada: Reload project](#ada-reload-project)\n      - [Tasks with keyboard shortcuts](#tasks-with-keyboard-shortcuts)\n    - [Bug Reporting](#bug-reporting)\n    - [Limitations and Differences with GNAT Studio](#limitations-and-differences-with-gnat-studio)\n  - [Integration with other editors and IDEs](#integration-with-other-editors-and-ides)\n    - [Integration with Coc.NVim](#integration-with-cocnvim)\n    - [Integration with vim-lsp](#integration-with-vim-lsp)\n    - [Integration with LanguageClient-Neovim](#integration-with-languageclient-neovim)\n    - [Integration with Neovim's built-in LSP client](#integration-with-neovims-built-in-lsp-client)\n    - [Integration with emacs lsp-mode](#integration-with-emacs-lsp-mode)\n    - [Integration with QtCreator](#integration-with-qtcreator)\n  - [Refactoring Tools](#refactoring-tools)\n  - [Authors \\\u0026 Contributors](#authors--contributors)\n  - [Contribute](#contribute)\n  - [License](#license)\n\n## Install\n\nYou can build language server from sources.\nTo build it from sources install dependencies and run\n\n```sh\nmake\n```\n\nIt will build `.obj/server/ada_language_server` file.\n\n### Dependencies\n\nTo build the language server you need:\n\n* The GNAT compiler (at least GCC 11 or GNAT Community Edition 2021)\n* The [Libadalang](https://github.com/AdaCore/libadalang) library (it should be\n  built)\n* The [Libadalang-tools](https://github.com/AdaCore/libadalang-tools) library\n* The [VSS](https://github.com/AdaCore/VSS) library\n* The [gnatdoc](https://github.com/AdaCore/gnatdoc) library\n* The [gpr](https://github.com/AdaCore/gpr) library\n* The process [spawn](https://github.com/AdaCore/spawn) library\n* The [lal-refactor](https://github.com/AdaCore/lal-refactor) library\n* The [templates-parser](https://github.com/AdaCore/templates-parser) library\n\nProject files of the libraries must be available via the `GPR_PROJECT_PATH`\nenvironment variable.\n\nIf you intend to use VS Code on this workspace, it is recommended to check out\nthese dependencies under `subprojects/` or install them under\n`subprojects/prefix`. That will make them automatically visible to the VS Code\nAda extension in this workspace.\n\nTo run the language server you need `gnatls` (part of GNAT installation)\nsomewhere in the path.\n\n## Usage\n\nThe `ada_language_server` doesn't require any command line options,\nbut it understands these options:\n\n* `--tracefile=\u003cFILE\u003e` - Full path to a file containing traces configuration\n* `--config=\u003cFILE\u003e` - Full path to a JSON file containing the server's configuration\n* `--help` - Display supported command like options and exit.\n\nYou can turn some debugging and experimental features through\n[the traces file](doc/traces.md).\n\nThe server also gets configuration via `workspace/didChangeConfiguration`\nnotification and `initializationOptions` of `initialize` request.\nSee more [details here](doc/settings.md). Each LSP\nclient provides its-own way to set such settings. You can use the `--config`\noption if you want to provide the configuration directly via a JSON file\ninstead of specifying it via the requests listed just above.\n\n### Memory Consumption\n\nThe `ada_language_server` relies on [Libadalang](https://github.com/AdaCore/libadalang) to compute the cross references.\nMost of this computation is done while indexing which will create an internal cache.\nThe expected memory size of this cache is around 300Mb per 100k lines of Ada code.\nFurthermore, 450Mb are necessary for the runtime.\nPlease note that some Ada structures like generics and tagged types might\nincrease the memory usage. This is also the case when using aggregate projects.\nThese measures were taken using both Resident Set Size and [Valgrind massif](https://valgrind.org/docs/manual/ms-manual.html) on Ubuntu 22.04LTS.\n\n## Supported LSP Server Requests\n\nSee [WiKi page](https://github.com/AdaCore/ada_language_server/wiki/Supported-LSP-requests)\nfor the list of supported requests.\n\n### Protocol Extensions\n\nThe Ada Language Server supports some features that are not in the official\n[Language Server Protocol](https://microsoft.github.io/language-server-protocol)\nspecification. See [corresponding document](doc/README.md).\n\n## VS Code Extension\n\nA VS Code extension based on this Ada Language Server is available on the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=AdaCore.ada).\nIt provides a full set of features including syntax highlighting, navigation, building and debugging.\n\n### Getting Started\n\nHere are some links that will help you get familiar with the VS Code extension for Ada \u0026 SPARK:\n\n* [Ada \u0026 SPARK for VS Code](integration/vscode/ada/README.md).\n* [Tutorial: Using Ada in VS Code](https://github.com/AdaCore/ada_language_server/wiki/Getting-Started).\n\n### Configuration\n\nYou can configure the extension via the `.vscode/settings.json` workspace settings file or the [multi-root workspace file](https://code.visualstudio.com/docs/editor/multi-root-workspaces).\nSee the setting list [here](doc/settings.md).\n\nHere is an example config file:\n\n```json\n{\n   \"ada.projectFile\": \"gnatcov.gpr\",\n   \"ada.scenarioVariables\": {\n      \"BINUTILS_BUILD_DIR\": \"/null\",\n      \"BINUTILS_SRC_DIR\": \"/null\"\n   },\n   \"ada.defaultCharset\": \"utf-8\",\n   \"ada.enableDiagnostics\": false,\n   \"ada.renameInComments\": false\n}\n```\n\n### Refactoring\n\nSee a [dedicated document](doc/refactoring_tools.md) with the list of available refactorings.\n\n### Tasks\n\nThe extension provides the following auto-detected tasks\n(under `/Terminal/Run Task...` menu):\n\n* `ada: Build current project` - launch `gprbuild` to build the current GPR project\n* `ada: Check current file` - launch `gprbuild` to check errors in the current editor\n* `ada: Clean current project` - launch `gprclean` to clean the current GPR project\n* `spark: Examine project` - launch `gnatprove` in flow analysis mode on the current GPR project\n* `spark: Examine file` - launch `gnatprove` in flow analysis mode on the file in the current editor\n* `spark: Examine subprogram` - launch `gnatprove` in flow analysis mode on the current subprogram in the current editor\n* `spark: Prove project` - launch `gnatprove` on the current GPR project\n* `spark: Prove file` - launch `gnatprove` on the file in the current editor\n* `spark: Prove subprogram` - launch `gnatprove` on the current subprogram in the current editor\n* `spark: Prove selected region` - launch `gnatprove` on the selected region in the current editor\n* `spark: Prove line` - launch `gnatprove` on the cursor line in the current editor\n* `spark: Clean project for proof` - launch `gnatprove` on the current GPR project to clean proof artefacts\n* `ada: Analyze the project with GNAT SAS`\n* `ada: Analyze the current file with GNAT SAS`\n* `ada: Create a report after a GNAT SAS analysis`\n* `ada: Analyze the project with GNAT SAS and produce a report`\n\nYou can bind keyboard shortcuts to them by adding to the `keybindings.json` file:\n\n```json\n{\n  \"key\": \"alt+v\",\n  \"command\": \"workbench.action.tasks.runTask\",\n  \"args\": \"ada: Check current file\",\n  \"when\": \"editorLangId == ada\"\n}\n```\n\n#### Task Customization\n\nYou can [customize auto-detected tasks](https://code.visualstudio.com/docs/editor/tasks#_customizing-autodetected-tasks)\nby providing extra tool command line options via the `args` property of the object in the `tasks.json`:\n\n```json\n{\n   \"version\": \"2.0.0\",\n   \"tasks\": [\n      {\n         \"type\": \"ada\",\n         \"command\": \"gprbuild\",\n         \"args\": [\n            \"${command:ada.gprProjectArgs}\",\n            \"-cargs:ada\",\n            \"-gnatef\",\n            \"-gargs\",\n            \"-vh\"\n         ],\n         \"problemMatcher\": [\"$ada\"],\n         \"group\": \"build\",\n         \"label\": \"ada: Build current project\"\n      }\n   ]\n}\n```\n\nYou can also customize the working directory of the task or the environment variables via the `options` property:\n\n```json\n{\n   \"version\": \"2.0.0\",\n   \"tasks\": [\n      {\n         \"type\": \"ada\",\n         \"command\": \"gprbuild\",\n         \"args\": [\n            \"${command:ada.gprProjectArgs}\",\n            \"-cargs:ada\",\n            \"-gnatef\"\n         ],\n         \"options\": {\n            \"cwd\": \"${workspaceFolder}/my/subdir\",\n            \"env\": {\n               \"MY_ENV_VAR\": \"value\"\n            }\n         },\n         \"problemMatcher\": [\"$ada\"],\n         \"group\": \"build\",\n         \"label\": \"ada: Build current project\"\n      }\n   ]\n}\n```\n\n#### Tasks for Project Mains\n\nIf your GPR project defines main programs via the project attribute `Main`, additional tasks are automatically provided for each defined main.\nFor example, if the project defines a `main1.adb` and `main2.adb` located under the `src/` source directory, the following tasks will be available:\n\n* `ada: Build main - src/main1.adb`\n* `ada: Run main - src/main1.adb`\n* `ada: Build and run main - src/main1.adb`\n* `ada: Build main - src/main2.adb`\n* `ada: Run main - src/main2.adb`\n* `ada: Build and run main - src/main2.adb`\n\n#### GNATtest Support\n\nIf you install GNATtest, the Ada \u0026 SPARK extension for VS Code will provide the following functionalities:\n\n* The task `ada: Create/update test skeletons for the project` will call `gnattest` to create test skeletons for your project automatically. You can use standard VS Code task customization to configure command line arguments to your liking in a `tasks.json` file.\n\n* Tests created with GNATtest will be loaded in the VS Code **Testing** view as follows.\n\n  \u003cimg src=\"doc/gnattest-test-tree.png\" width=\"650\" alt=\"GNATtest Test Tree\"\u003e\n\n* Tests can be executed individually or in batch through the available buttons in the interface, or through the `Test: Run All Tests` command or related commands.\n\n* Test execution results are reflected in the test tree.\n\n  \u003cimg src=\"doc/gnattest-results.png\" width=\"500\" alt=\"GNATtest Test Results\"\u003e\n\nGNATtest support has the following known limitations:\n\n* The extension relies on the default conventions of GNATtest such as the naming, location and object directory of the test harness project.\n  If those aspects are configured or altered manually, the features may no longer work.\n\n* Test execution always starts with a `gprbuild` call on the test harness project. It is not possible to disable that call or customize its arguments. This limitation will be lifted in future releases.\n\n* Language support such as navigation and auto-completion is limited when editing test sources. A workaround is to modify the `ada.projectFile` setting to point to the test harness project created by GNATtest. That should restore language support when developing tests.\n\n* Sections of test sources delimited by `begin read only` and `end read only` comments are not really protected from inadvertant edits.\n  To ensure proper interactions with GNATtest, you must refrain from making edits in those sections.\n\n#### ALIRE Support\n\nWhen the workspace is an ALIRE project (i.e. it contains an `alire.toml` file), tasks automatically use standard ALIRE commands.\n\nFor example, the `ada: Build current project` task uses the command `alr build` and the `ada: Clean current project` task uses the command `alr clean`.\n\nAll other tasks use `alr exec -- ...` to execute the command in the environment provided by ALIRE.\n\n### Commands and Shortcuts\n\nThe extension contributes commands and a few default key bindings.\nBelow are a few examples, and other commands can be found by searching for `Ada:` in the command list.\n\n#### Ada: Go to other file\n\nThis command switches between specification and implementation Ada files.\nThe default shortcut is `Alt+O`.\n\n#### Ada: Add subprogram box\n\nThis command inserts a comment box before the current subprogram body.\nThe default shortcut is `Alt+Shift+B`.\n\n#### Ada: Reload project\n\nThis command reloads the current project.\nThe default shortcut is `None`.\n\n#### Tasks with keyboard shortcuts\n\nThe following default shortcuts are provided for tasks:\n\n| Task                           | Shortcut        |\n|--------------------------------|-----------------|\n| `spark: Prove file`            | `Meta+Y Meta+F` |\n| `spark: Prove subprogram`      | `Meta+Y Meta+S` |\n| `spark: Prove selected region` | `Meta+Y Meta+R` |\n| `spark: Prove line`            | `Meta+Y Meta+L` |\n\n`Meta` = ⌘ on macOS, `Win` on Windows, `Meta` on Linux\n\nThese shortcuts can be customized and new shortcuts can be added for other tasks by using the command `Preferences: Open Keyboard Shortcuts (JSON)` and adding entries like the following example:\n\n```json\n{\n    \"command\": \"workbench.action.tasks.runTask\",\n    \"args\": \"ada: Check current file\",\n    \"key\": \"meta+y meta+c\",\n    \"when\": \"editorLangId == ada \u0026\u0026 editorTextFocus\"\n}\n```\n\n### Bug Reporting\n\nYou can use the VS Code `Issue Reporter` to report issues. Just click on the `Help -\u003e Report Issue` menu, select `An extension` for the `File on` entry and `Language Support for Ada` for the extension name. Put as many information you can in the description, like steps to reproduce, stacktraces or system information (VS Code automatically includes it by default). This will create a GitHub issue in the [Ada Language Server](https://github.com/AdaCore/ada_language_server/) repository.\n\nALS log files can be found under the `~/.als` directory (`%USERPROFILE%/.als` on Windows). Feel free to attach them on the issues, it helps a lot for further investigation, specially when the `ALS.IN` and `ALS.OUT` traces are enabled (more info about traces configuration can be found [here](doc/traces.md).)\n\n### Limitations and Differences with GNAT Studio\n\nThe VS Code extension has a few limitations and some differences compared to [GNAT Studio](https://github.com/AdaCore/gnatstudio):\n\n* **Indentation/formatting**: it does not support automatic indentation when adding a newline and range/document\nformatting might no succeed on incomplete/illegal code.\n\n* **Tooling support**: we currently provide support for some *SPARK*, *GNATtest* and *GNAT SAS* [Tasks](#tasks), but there is no support for tools such as *GNATcheck* or *GNATcoverage* yet.\n\n* **Alire support**: if the root folder contains an `alire.toml` file and\n  there is `alr` executable in the `PATH`, then the language server fetches\n  the project's search path, environment variables and the project's file\n  name from the crate description. [Tasks](#tasks) are also automatically\n  invoked with ALIRE in this case.\n\n* **Project support**: there is no `Scenario` view: users should configure scenarios via the *ada.scenarioVariables* setting (see the settings list available [here](doc/settings.md)). Saving the settings file after changing the values will automatically reload the project and update the\npredefined tasks to take into account the new scenario values.\n\n  Source directories from imported projects should be added in a [workspace file](https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces). If you already have a workspace file, the extension will propose you to automatically add all the source directories coming from imported projects to your workspace automatically at startup.\n\n## Integration with other editors and IDEs\n\n### Integration with Coc.NVim\n\nIf you want to use the Ada Language Server with Vim/Neovim, you can use the\n[Coc.NVim](https://github.com/neoclide/coc.nvim). You'll have to\n[install](#install) the Ada Language Server manually somewhere on your\ncomputer. Follow installation instructions on Coc.NVim website and then\nconfigure the Ada Language Server with `:CocConfig`:\n\n```json\n{\n  \"languageserver\": {\n    \"ada\": {\n      \"settings\": {\n        \"ada\": {\n          \"projectFile\": \"gnat/vss_text.gpr\"\n        }\n      },\n      \"command\": \"\u003cpath\u003e/ada_language_server\",\n      \"filetypes\": [\n        \"ads\",\n        \"adb\",\n        \"ada\"\n      ]\n    }\n  }\n}\n```\n\n### Integration with vim-lsp\n\nIf you want to integrate the Ada Language Server into vim, you can use the\n[vim-lsp](https://github.com/prabirshrestha/vim-lsp).\n\nYou'll have to [install](#install) the Ada Language Server manually somewhere on your\ncomputer, and then you can add the following line to your `.vimrc` file:\n\n```viml\nif executable('ada_language_server')\n    au User lsp_setup call lsp#register_server({\n        \\ 'name': 'ada_language_server',\n        \\ 'cmd': ['ada_language_server'],\n        \\ 'allowlist': ['ada'],\n        \\ 'workspace_config': {'ada': {\n        \\     'projectFile': \"project.gpr\",\n        \\     'scenarioVariables': {\"ARCH\": \"x86_64-pc-linux-gnu\"}}},\n        \\ })\nendif\n```\n\n### Integration with LanguageClient-Neovim\n\nIf you want to integrate the Ada Language Server into Neovim, you can use the\n[LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim).\n\nYou'll have to [install](#install) the Ada Language Server manually somewhere on your\ncomputer, and then you can add the following line to your `init.vim` file:\n\n```viml\n\" replace the path below with the proper path to the ada_language_server executable\nlet g:LanguageClient_serverCommands = {\n    \\ 'ada': ['path/to/ada_language_server'],\n    \\ }\n\" if you already have LanguageClient_serverCommands, just add a line for ada.\n```\n\nTo configure the Ada Language Server for a specific workspace/project, you can\nuse the `.vim/settings.json` file. It is mandatory as soon as you want to use a\nspecific `.gpr` project file.\n\nThis is the way to specify a project file, eg. you cannot open a project file\nanother way.\nSee the setting list [here](doc/settings.md).\n\nHere is an example of a settings file:\n\n```json\n{\n    \"ada.projectFile\": \"project.gpr\",\n    \"ada.scenarioVariables\": {\n        \"GLFW_Version\": \"3\",\n        \"GLFW_Lib\": \"-lglfw\",\n        \"Windowing_System\": \"x11\"\n    }\n}\n```\n\nThe location where the `.vim` folder is located will determine the relative\npath of the project file (so no need to prefix with `..`). When vim is opened\nin the folder containing this `.vim` directory, it will use those settings for\nthe language server *even for files which might have nothing to do with that\nspecific project*, so this needs to be taken into account. Ultimately what this\nmeans is that the configuration is determined by where you open vim.\n\n### Integration with Neovim's built-in LSP client\n\nNeovim 0.5.0 and later have a built-in LSP client which can be used with the\nAda Language Server. In order to use it with minimal effort, follow these steps:\n\n* Install the ada language server and make sure it's in your $PATH.\n* Use your favorite Neovim plugin manager to add the default set of [LSP\n  configuration files](https://github.com/neovim/nvim-lspconfig) to Neovim.\n* Add `require('lspconfig').ada_ls.setup{}` to your init.lua in order to enable\n  the Ada Language Server.\n\nIf you would rather not have the ada language server in your path, you can give\nthe lsp client an absolute path to the ALS executable:\n\n```lua\nrequire('lspconfig').ada_ls.setup{ cmd = \"/path/to/als/executable\" }\n```\n\nConfiguring the language server's settings can be achieved like this:\n\n```lua\nrequire('lspconfig').ada_ls.setup{\n  settings = {\n    ada = {\n      projectFile = \"project.gpr\";\n      scenarioVariables = { ... };\n    }\n  }\n}\n```\n\nThe Ada Language Server's settings are described [here](doc/settings.md).\nConfiguring neovim to use project-specific settings is described neovim's\n[lspconfig wiki](https://github.com/neovim/nvim-lspconfig/wiki/Project-local-settings)\n\n### Integration with emacs lsp-mode\n\nThe configuration for each project can be provided using a `.dir-locals.el`\nfile defined at the root of each project.\n\nThe scenario variables should be declared in your `.emacs` or any loaded\nEmacs configuration file.\n\n```elisp\n(defgroup project-build nil\n  \"LSP options for Project\"\n  :group 'ada-mode)\n\n(defcustom project-build-type \"Debug\"\n  \"Controls the type of build of a project.\n   Default is Debug, other choices are Release and Coverage.\"\n  :type '(choice\n          (const \"Debug\")\n          (const \"Coverage\")\n          (const \"Release\"))\n  :group 'project-build)\n```\n\nYour `.dir-locals.el` in the project root should be similar to:\n\n```elisp\n((ada-mode .\n  ((eval . (lsp-register-custom-settings\n      '((\"ada.scenarioVariables.BINUTILS_SRC_DIR\" project-binutils-dir)\n        (\"ada.scenarioVariables.BUILD_TYPE\" project-build-type \"Release\"))))\n   (lsp-ada-project-file . \"/home/username/project/project.gpr\"))\n  ))\n```\n\nThe [lsp-mode](https://github.com/emacs-lsp/lsp-mode) provides built-in support\nfor the `ada_language_server` and defines default customizable configuration\nvalues in the `lsp-ada` group that can be edited similarly to\n`lsp-ada-project-file` in the example above.\n\n### Integration with QtCreator\n\nStarting with version `4.9`, QtCreator supports a LSP plugin. Follow\n[the official documentation](https://doc.qt.io/qtcreator/creator-language-servers.html)\nto configure the Ada Language Server in this plugin. Make sure to set `Startup behavior`\nto `Start Server per Project`, otherwise QtCreator won't provide the project root to\nthe Ada Language Server. QtCreator doesn't send any configuration request to the language server, so the only\noption to enable project support is to have a single `.gpr` file in the QtCreator\nproject folder. For a projectless configuration, you could also place all Ada sources in\nthe project root folder, this should work as well.\n\n## Refactoring Tools\n\nSee [corresponding document](doc/refactoring_tools.md).\n\n## Authors \u0026 Contributors\n\n* Maintained by [AdaCore](https://www.adacore.com).\n* Original author [@MaximReznik](https://github.com/reznikmm).\n* Support for the Visual Studio Code classifier and snippets contributed by [@Entomy](https://github.com/Entomy).\n\n## Contribute\n\nFeel free to dive in! Read the [developer's guide](doc/HACKING.md).\n\nDon't hesitate to [open an issue](https://github.com/AdaCore/ada_language_server/issues/new) or submit PRs.\n\n## License\n\n[GPL-3](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdaCore%2Fada_language_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAdaCore%2Fada_language_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdaCore%2Fada_language_server/lists"}