Skip to content

Commit

Permalink
Add support for GNAT Project. (emacs-lsp#4417)
Browse files Browse the repository at this point in the history
  • Loading branch information
brownts authored Apr 8, 2024
1 parent 0f85b38 commit 5b01984
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* Changelog
** Unreleased 9.0.1
* Add support for GNAT Project (~gpr-mode~, ~gpr-ts-mode~).

** 9.0.0
* Add language server config for QML (Qt Modeling Language) using qmlls.
Expand Down
11 changes: 11 additions & 0 deletions clients/lsp-ada.el
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@
:synchronize-sections '("ada")
:environment-fn 'lsp-ada--environment))

(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection
(lambda () (list (lsp-package-path 'ada-ls)
"--language-gpr")))
:major-modes '(gpr-mode gpr-ts-mode)
:priority -1
:download-server-fn (lambda (_client callback error-callback _update?)
(lsp-package-ensure 'ada-ls callback error-callback))
:server-id 'gpr-ls
:environment-fn #'lsp-ada--environment))

(lsp-consistency-check lsp-ada)

(provide 'lsp-ada)
Expand Down
9 changes: 9 additions & 0 deletions docs/lsp-clients.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,15 @@
"installation-url": "https://github.com/nametake/golangci-lint-langserver#installation",
"debugger": "Not available"
},
{
"name": "gpr",
"full-name": "GNAT Project",
"server-name": "ada_language_server",
"server-url": "https://github.com/AdaCore/ada_language_server",
"installation-url": "https://github.com/AdaCore/ada_language_server#install",
"lsp-install-server": "gpr-ls",
"debugger": "Not available"
},
{
"name": "grammarly",
"full-name": "Grammarly",
Expand Down
4 changes: 4 additions & 0 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,8 @@ Changes take effect only when a new session is started."
("^yang\\.settings$" . "jsonc")
(ada-mode . "ada")
(ada-ts-mode . "ada")
(gpr-mode . "gpr")
(gpr-ts-mode . "gpr")
(awk-mode . "awk")
(awk-ts-mode . "awk")
(nxml-mode . "xml")
Expand Down Expand Up @@ -6008,6 +6010,8 @@ Request codeAction/resolve for more info if server supports."
(erlang-mode . erlang-indent-level) ; Erlang
(ess-mode . ess-indent-offset) ; ESS (R)
(go-ts-mode . go-ts-mode-indent-offset)
(gpr-mode . gpr-indent-offset) ; GNAT Project
(gpr-ts-mode . gpr-ts-mode-indent-offset)
(hack-mode . hack-indent-offset) ; Hack
(java-mode . c-basic-offset) ; Java
(java-ts-mode . java-ts-mode-indent-offset)
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ nav:
- GDScript: page/lsp-gdscript.md
- Gleam: page/lsp-gleam.md
- GLSL: page/lsp-glsl.md
- GNAT Project: page/lsp-gpr.md
- Go (gopls): manual-language-docs/lsp-gopls.md
- Grammarly: page/lsp-grammarly.md
- GraphQL: page/lsp-graphql.md
Expand Down

0 comments on commit 5b01984

Please sign in to comment.