❌ About FreshRSS

Reading view

There are new articles available, click to refresh the page.

Ada and Emacs

Hello! I am a new Ada learner and (Doom) Emacs user. I know there's ada-mode and also lsp-mode + ALS, but nowhere on the internet did I see how to connect them so they work together. This is what I currently have (on Doom Emacs it's in .config.el):

;; after! = with-eval-after-hook (I think) (after! ada-mode (add-hook 'ada-mode-hook (lambda () (when (derived-mode-p 'ada-mode) (lsp))))) (defgroup project-build nil "LSP options for Project" :group 'ada-mode) (defcustom project-build-type "Debug" "Controls the type of build of a project. Default is Debug, other choices are Release and Coverage." :type '(choice (const "Debug") (const "Coverage") (const "Release")) :group 'project-build) (defcustom lsp-ada-executable "ada_language_server" :group 'lsp-ada :risky t :type 'file) (after! lsp-mode (add-to-list 'lsp-language-id-configuration '(ada-mode . "ada")) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection (lambda () lsp-ada-executable)) :activation-fn (lsp-activate-on "ada") :priority -1 :server-id 'als))) 

However, it doesn't find my Alire project, it doesn't even try with Alire project files and it feels really shoehorned and not enjoyable. What's your Emacs setup? I am sure the tooling can't be this bad, especially for something having the support of GNU and AdaCore. Thank you!

submitted by /u/uneven-shiver
[link] [comments]
❌