From: Troy Brown <brownts@troybrown.dev>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
73280@debbugs.gnu.org
Subject: bug#73280: 30.0.90; Eglot: eglot-workspace-configuration might not be found in .dir-locals.el
Date: Mon, 16 Sep 2024 13:07:15 -0400 [thread overview]
Message-ID: <CABvCZ415yyzEEjvW4fKT86Nv_HWysrA03EYJBSLkNkuEohXbuw@mail.gmail.com> (raw)
In-Reply-To: <CALDnm51-QMPxisdTk8FCaVrgQyQHfvWyg0p1-9Cky5ARco=GjQ@mail.gmail.com>
On Mon, Sep 16, 2024 at 9:48 AM João Távora <joaotavora@gmail.com> wrote:
>
> On Mon, Sep 16, 2024 at 12:38 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > João and Stefan, any comments?
> >
> > FWIW, I'd rather think this is a feature, since users don't need
> > separate Eglot settings for ada-mode and ada-ts-mode. But maybe I'm
> > missing something.
>
> You didn't miss that much. This is half-feature, half
> headache-I-didn't-want-to-worry-about. So I put int the 'car'
> on purpose. The first of the modes listed in a e-s-programs entry
> is usually the most representative one of the language, more or less.
>
> Is there a downside to mentioning a major mode you don't
> actually use in your .dir-locals.el, Troy?
>
I would say the major downside is that it is not intuitive at all.
It's not consistent with how directory-local variables behave. When I
saw that the variable was set locally in my buffer but that the
configuration wasn't actually applied to the server, I had to dig into
this and understand what was going on. I have to imagine anyone else
using this would be just as stumped as I was when it wasn't working.
I don't think I'd agree with the first mode being representative, it
seems somewhat arbitrary. For instance, in order to change
eglot-workspace-configuration for "sh-mode", you have to set the
configuration in .dir-locals.el for "bash-ts-mode"...who would've
guessed this? Just looking through the lists of modes corresponding
to the same server, I don't think people would normally make this
connection, and the fact that it doesn't work the same way that
directory-local variables do, makes it even more unexpected and
confusing.
What about having eglot--workspace-configuration-plist cycle through
the list of modes for the server until it finds a non-nil
eglot-workspace-configuration, or has scanned them all? This would
seem like a better approach since it will at least find a
configuration if one exists, rather than ignoring an existing
configuration. I don't know if that would be considered too CPU
intensive or not. It's still not the same behavior as a directory
local variable, but I think it would be an improvement over the
current behavior.
next prev parent reply other threads:[~2024-09-16 17:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-15 19:54 bug#73280: 30.0.90; Eglot: eglot-workspace-configuration might not be found in .dir-locals.el Troy Brown
2024-09-16 11:38 ` Eli Zaretskii
2024-09-16 13:48 ` João Távora
2024-09-16 17:07 ` Troy Brown [this message]
2024-09-16 18:15 ` Eli Zaretskii
2024-09-16 18:39 ` João Távora
2024-09-16 18:43 ` Eli Zaretskii
2024-09-16 18:53 ` Troy Brown
2024-09-16 19:07 ` João Távora
2024-09-16 21:34 ` Troy Brown
2024-09-16 19:17 ` Eli Zaretskii
2024-09-16 21:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABvCZ415yyzEEjvW4fKT86Nv_HWysrA03EYJBSLkNkuEohXbuw@mail.gmail.com \
--to=brownts@troybrown.dev \
--cc=73280@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.