I’ll try to speak to each of your concerns and am open to making changes that improves the user experience. I apologize in advance that this response ended up being rather lengthy.
Thank you about that. I appreciate your lengthy help.
For Imenu at least, you are just a
M-x imenu-add-menubar-index
away. You could also add this to the mode hook. I can add this to the example configuration if it would help. Personally, I useconsult-imenu
(andimenu
in Emacs 30 with theimenu-flatten
setting), so this is another case where people may use different approaches to solve their problem. I typically bindconsult-imenu
toC-c C-m
.
I used M-x imenu-add-menubar-index
but didn’t know about consult-imenu
. It seems useful.
I don’t like choosing people’s key bindings, because everyone has different key chord styles they prefer, especially when it comes to the Control key and where it resides on their keyboard.
As a user, I appreciate when I’m not flooded by a sea of choices. Having a well thought set of defaults shouldn’t hart anybody, or does it in a way I don’t see?
What about
project-find-file
(i.e.,C-x p f
)?
I tried that, and it discovered the root of my project (as a git repository, I guess). But it completely ignored my ads
and adb
. It offered even * ~
files, but not my sources. I guess it requires a configuration. Could it be done by the Ada mode?
For building the project, does
project-compile
(i.e.,C-x p c
) not work for you?
(project-compile)
Run ‘compile’ in the project root.
Seems useful, but it would be nice if it populated the prompt with gprbuild
if there is a gpr
file in the project root, or alr build
if there is alire.toml
Put please log a GitHub issue if you are struggling with this and I can help you there.
Using this other Pretty_Printer option and upgrading eglot to 1.7 did not solve the issue. And there is a strange behaviour now, that I don’t remember happening before; it inserts 4 characters after typing every “;
”.
I’ll try to find out more, and probably I have to open that issue, thanks.
I personally prefer to use
lsp-mode
withada-ts-mode
because it supports semantic highlighting and Eglot doesn’t, but either LSP client should work withada-ts-mode
.
I tried lsp-mode and I received errors and strange behaviour including deleting what I typed.
Error running timer ‘lsp–on-idle’: (wrong-type-argument number-or-marker-p nil) [2 times]
lsp-mode is version 20240906.1743 from melpa.
If you have ideas on how to exploit it that haven’t been achieved, please share them with me.
The only thing that comes to my mind is providing a command to build the project, but I don’t know if that is provided by the Ada Language Server or the VS Code extension. Remaining things might be already there, but I don’t get the setup or the compatible set of packages to make it work. I’m not happy to admit it, but VS Code provided a very good out-of-the-box experience, but I miss a lot of functionality of Emacs for basic editing to make the switch. Indentation was also a negative point, compared to the traditional ada-mode
.
By the way, I found an interesting discussion when searching for ada-ts-mode
in the emacs-devel list: Re: Ada-mode to be abandoned? I don’t know if you were aware of it.