ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still problems with ada-mode-8.1.0


From: Troy Brown
Subject: Re: Still problems with ada-mode-8.1.0
Date: Thu, 28 Mar 2024 16:37:00 -0400

If you're considering leaving Emacs over the lack of a maintainer for
ada-mode, I'd suggest giving ada-ts-mode a try.  I was hesitant about
mentioning it on the ada-mode mailing list, but since it appears
nobody has stepped up to maintain ada-mode, I figured I'd be remiss if
I didn't at least mention it here.  You said you had trouble with
Emacs 29, so that might be a deal-breaker if you can't get Emacs 29
working, as that's required for tree-sitter support.

I had the same issues previously mentioned where I wanted the ada-mode
package to be installed and work immediately, not have to then build
from source as a follow-on activity.  I often hesitated updating
ada-mode because I didn't want to rebuild it.  I had thought this
would have gotten better with the Alire integration, but by that time
I had moved on.  However, I've still seen a number of complaints on
the mailing list even with Alire integration.  The issue of building
from source becomes compounded when you are running on multiple
Operating Systems.

My main goal with ada-ts-mode was to remove the friction I felt in
ada-mode.  In addition to installation issues, I didn't like the
opinionated defaults and some of them were more involved to disable
than others.  I've mentioned some of these defaults that I didn't like
in past posts.  I also had other problems such as ada-mode's trouble
handling files with mixed LF/CRLF end-of-line markers.  Working on
legacy code bases where this occurs is troublesome with ada-mode.

I believe the only thing missing from ada-ts-mode (at least for me) is
indentation support (which I have a significant portion of this
implemented, just not publicly available yet as I wanted to have a
complete implementation before releasing it).  If desired, you can use
the Ada Language Server indentation support.  I was hesitant about
adding indentation support for ada-ts-mode because I figured the LSP
indentation might be sufficient.  However, I finally decided I was
going to implement it, just so that it is available without needing a
Language Server.

My Emacs workflow in Ada typically involves ada-ts-mode, gpr-ts-mode
and lsp-mode.  I currently prefer lsp-mode over eglot as there is (at
least when I compared the two) additional functionality in lsp-mode
vs. eglot.  For instance, lsp-mode supports semantic highlighting and
eglot does not support it.  lsp-mode also provides
installation/upgrade/removal of the Ada LSP, where as far as I know,
eglot does not support installing your language server.  The lsp-ui
package also provides documentation pop-up windows which I've
configured to work much like VSCode where it shows the signature and
documentation with mouse hover over a symbol.  I feel this combination
of packages rivals, if not exceeds the VSCode support.  The reason I
say exceeds is because the font-locking performed by ada-ts-mode uses
a concrete syntax tree (via tree-sitter) whereas the syntax
highlighting in VSCode uses regular expressions, which are not
perfect.

You also mention having issues building the Ada Language Server.  I
assume you know that there are pre-built binaries available that you
can use instead of building from source.  If you want to build from
source, that's fine, just thought I'd mention that you could use the
Ada LS pre-built binaries instead, available on AdaCore's github.

On Sat, Mar 23, 2024 at 1:01 PM Simon Wright <simon.j.wright@mac.com> wrote:
>
> On 23 Mar 2024, at 10:59, Per Dalgas Jakobsen <pdj@knaldgas.dk> wrote:
>
> error in process filter: wisi-process-parse--filter: error: CONSTRAINT_ERROR 
> : sal-gen_definite_doubly_linked_lists.adb:167 access check failed
> error in process filter: error: CONSTRAINT_ERROR : 
> sal-gen_definite_doubly_linked_lists.adb:167 access check failed
>
>
> I have *exactly* this issue. Sonoma 14.3.1 (M1), Emacs 28.2 (I think I had 
> some issue with 29, will have to see if I noted it down, or try again), GCC 
> 13.2.0-aarch64, Alire 2.0.
>
> This problem makes it *extremely* difficult to investigate itself! As soon as 
> I try editing the sources, bang!.
>
> I could use GNAT Studio, but I find it very awkward in comparison with 
> Emacs/ada-mode.
>
> I’m trying the new eglot stuff, but I have to say I’m not clear how to get it 
> set up.The Ada Language Server build under Alire needed a couple of 
> workrounds (https://github.com/AdaCore/ada_language_server/issues/1190), and 
> eglot picks it up OK; what I need to happen is for eglot/als to take over 
> from the ada-mode executable that’s giving us the trouble. (I hope that’s 
> what it does, if not it’s GNAT Studio :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]