GNU bug report logs - #73280
30.0.90; Eglot: eglot-workspace-configuration might not be found in .dir-locals.el

Previous Next

Package: emacs;

Reported by: Troy Brown <brownts <at> troybrown.dev>

Date: Sun, 15 Sep 2024 19:55:02 UTC

Severity: normal

Found in version 30.0.90

Full log


View this message in rfc822 format

From: Troy Brown <brownts <at> troybrown.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73280 <at> debbugs.gnu.org, joaotavora <at> gmail.com, monnier <at> iro.umontreal.ca
Subject: bug#73280: 30.0.90; Eglot: eglot-workspace-configuration might not be found in .dir-locals.el
Date: Mon, 16 Sep 2024 14:53:53 -0400
On Mon, Sep 16, 2024 at 2:15 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > I would say the major downside is that it is not intuitive at all.
>
> With the emergence of the *-ts-mode modes, we need to adjust our
> intuition.  We decided that having foo-mode settings cover foo-ts-mode
> as well as much as possible is an advantage, not a disadvantage.  So
> our intuition needs to follow suit.
>

That would be fine if this was isolated to only "ts" vs "non-ts"
modes.  Another example is "typescript-mode".  In order to configure
the server, you have to use "js-mode" in .dir-locals.el.  Why?
Because it's the first one in the list.

> > It's not consistent with how directory-local variables behave.
>
> I disagree.  Certain settings in .dir-locals are completely global,
> which is even more radical than this case.  Having to specify a
> setting once for several related modes is a Good Thing, IMO.
>

I proposed in my last response a mechanism where you could specify a
configuration for any of the modes associated with a server and have
it applied, rather than ignoring a configuration if it wasn't
explicitly specified for the first one in the list.  The way it
currently exists, you'll never be able to change the first mode in the
list or you will likely break someone's .dir-locals.el which had to
rely on this ordering in order to properly configure their server.

> > 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?
>
> I'd like to think that in a not-so-distant future, _everyone_ will
> guess that.  Why not? it makes perfect sense to me.

What is that?  It's not consistent with the "foo-mode settings cover
foo-ts-mode", it's actually the other way around.  You have to set the
"ts" version in order to have it apply to the "non-ts" version.  YAML
is another one where the "ts" version is listed first in the list.
These are inconsistent.  Some lists specify the "non-ts" version
before the "ts" version, others swap those.  And furthermore, some
lists contain multiple "non-ts" modes, so it's arbitrary which one is
listed first.




This bug report was last modified 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.