From b6b0dc7410791725f7157bd2e47fef0a01396624 Mon Sep 17 00:00:00 2001 From: Ghjuvan Lacambre Date: Thu, 24 Oct 2024 13:47:42 +0200 Subject: feat: ada_ls #3394 The configuration for the Ada Language Server was first added in #171 and removed in #3310. The removal happened due to misunderstandings, it was thought at the time that the default language server configuration could not work on its own (#1683), it turns out that this was actually caused by a bug in the ALS that was fixed a long time ago. This means the default ALS configuration can be re-introduced. However, in the meantime, a new neovim plugin for Ada was created and the name "als" was borrowed, thus we have to use a new name, ada_ls, in order to avoid breaking this plugin. This reverts commit 7b8b0b3ddd0ed6eddc93982753acaddc578defac. --- lua/lspconfig/configs/ada_ls.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lua/lspconfig/configs/ada_ls.lua (limited to 'lua') diff --git a/lua/lspconfig/configs/ada_ls.lua b/lua/lspconfig/configs/ada_ls.lua new file mode 100644 index 00000000..3a8c79b0 --- /dev/null +++ b/lua/lspconfig/configs/ada_ls.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ada_language_server' }, + filetypes = { 'ada' }, + root_dir = util.root_pattern('Makefile', '.git', '*.gpr', '*.adc'), + }, + docs = { + description = [[ +https://github.com/AdaCore/ada_language_server + +Installation instructions can be found [here](https://github.com/AdaCore/ada_language_server#Install). + +Can be configured by passing a "settings" object to `ada_ls.setup{}`: + +```lua +require('lspconfig').ada_ls.setup{ + settings = { + ada = { + projectFile = "project.gpr"; + scenarioVariables = { ... }; + } + } +} +``` +]], + default_config = { + root_dir = [[util.root_pattern("Makefile", ".git", "*.gpr", "*.adc")]], + }, + }, +} -- cgit v1.2.3-70-g09d2