Skip to content

Commit

Permalink
feat: ada_ls #3394
Browse files Browse the repository at this point in the history
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 7b8b0b3.
  • Loading branch information
glacambre authored Oct 24, 2024
1 parent edd9591 commit b6b0dc7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions lua/lspconfig/configs/ada_ls.lua
Original file line number Diff line number Diff line change
@@ -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")]],
},
},
}

0 comments on commit b6b0dc7

Please sign in to comment.