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

From: Troy Brown <[email-masked]>
Date: Mon, 16 Sep 2024 17:34:02 -0400

On Mon, Sep 16, 2024 at 3:06 PM João Távora <[email-masked]> wrote:
>
> On Mon, Sep 16, 2024 at 7:54 PM Troy Brown <[email-masked]> wrote:
>
> > 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.
>
> Well, typescript is a transpile-to-js language, doesn't strike me as
> that odd.
>
> Also have you read section 5.1.1 of the Eglot's user manual?  You
> can just use `nil` as the mode and `w-s-configuration` will
> be set buffer-locally in all modes for buffers within that dir.
> This is probably easier.  Check it out.

Thanks for the pointer on using "nil", I had forgotten about that.

Since it appears I'm failing to make a convincing argument, I think
that using "nil" will be my approach going forward.  I'll avoid using
mode-based configuration in Eglot, as I find it deceptive and prone to
future breakage.  In its current state, I think it would be wise to
discourage its use in the user manual, to avoid misunderstanding and
potential future problems.

I'm surprised nobody has raised this issue in the past, but don't be
surprised if you receive additional bug reports in the future.