aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorGhjuvan Lacambre <lacambre@adacore.com>2024-10-24 13:47:42 +0200
committerGitHub <noreply@github.com>2024-10-24 04:47:42 -0700
commitb6b0dc7410791725f7157bd2e47fef0a01396624 (patch)
tree3aa08c6ddd10dafa725fea4d524287ada0710654 /lua
parentchore(config): improve on_new_config type (#3392) (diff)
downloadnvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.tar
nvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.tar.gz
nvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.tar.bz2
nvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.tar.lz
nvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.tar.xz
nvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.tar.zst
nvim-lspconfig-b6b0dc7410791725f7157bd2e47fef0a01396624.zip
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.
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs/ada_ls.lua32
1 files changed, 32 insertions, 0 deletions
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")]],
+ },
+ },
+}