emacs-devel
[Top][All Lists]
Advanced

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

Re: Renaming eglot -- or at least add an alias?


From: Stephen Leake
Subject: Re: Renaming eglot -- or at least add an alias?
Date: Wed, 12 Oct 2022 17:41:03 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)

Yuan Fu <casouri@gmail.com> writes:

>> On Oct 11, 2022, at 11:04 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
> IMO in some sense, eglot and major mode sits at the same level, and
> tree-sitter a level lower. Consider this: take imenu as an example.
> Major mode sets imenu-create-index-function for imenu to function. A
> major mode now has two options available, one function uses
> tree-sitter and one don’t. If the user enables eglot, eglot sets
> menu-create-index-function to eglot-imenu, overriding major mode’s
> function. From this perspective, tree-sitter is just a mechanism a
> major mode could use, not unlike syntax-ppss, while eglot do things
> its own way, replacing parts of the major mode’s functionality with
> its own.
>
> So it’s not really “two back-ends”, tree-sitter and eglot are
> different in fundamental ways.

I've just finished changing ada-mode 8.0 to be compatible with eglot (not
released yet, but soon), and it now very much treats eglot as one of two
possible backends (with the existing wisi parser and gpr_query the
other, and tree-sitter being a possible third in the future).

Almost every place where eglot does something by default can be
disabled, by setting eglot-stay-out-of appropriately.

So major-modes can treat eglot as just an interface to a language
server.

ada-mode 8.0 provides three variables to control this:

(defcustom ada-face-backend :options '(none eglot wisi)

(defcustom ada-indent-backend :options '(none eglot wisi)

(defcustom ada-xref-backend :options '(gpr_query gnat eglot)

If you have the current ada_language_server installed, but not the Ada
wisi parser, then ada-face-backend defaults to none, since that server
doesn't support it. Similarly for the other backends.

I should have initial feedback from beta testers in a month or so.

-- 
-- Stephe



reply via email to

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