GNU bug report logs - #58894
Comments on Eglot manual

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sun, 30 Oct 2022 11:06:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58894 in the body.
You can then email your comments to 58894 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#58894; Package emacs. (Sun, 30 Oct 2022 11:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Oct 2022 11:06:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Comments on Eglot manual
Date: Sun, 30 Oct 2022 12:05:27 +0100
Find below some comments on the "Customizing Eglot" section of the manual:

> [...] via the variable ‘eglot-workspace-configuration’.  Eglot sends the
> portion of the settings contained in this variable to each server for
> which such settings were defined in the variable.

This is not true.  The entire `eglot-workspace-configuration' is sent to
the server; presumably, severs ignore everything which is not under its
own prefix, but that's just a convention.

> JSON values ‘true’, ‘false’, ‘null’ and ‘{}’ are represented by the
> Lisp values ‘t’, ‘:json-false’, ‘nil’, and ‘eglot-{}’, respectively.

Unless something has been renamed recently, it's `eglot--{}', not
`eglot-{}'.

>    Alternatively, the same configuration could be defined as follows:
> 
>      ((nil
>        . ((eglot-workspace-configuration
>            . (:pylsp (:plugins (:jedi_completion (:include_params t
>                                                   :fuzzy t)
>                                 :pylint (:enabled :json-false)))
>               :gopls (:usePlaceholders t))))))

This is more or less obvious, if you know how dir-local variables work.
So I would suggest mentioning a different configuration method:

Alternatively, you can set a default workspace configuration globally by
adding the following to your init file:

       (setq-default
         eglot-workspace-configuration
         '(:pylsp (:plugins (:jedi_completion (:include_params t
                                               :fuzzy t)
                             :pylint (:enabled :json-false)))
           :gopls (:usePlaceholders t))



>    This is an equivalent setup which sets the value for all the
> major-modes inside the project; Eglot will use for each server only the
> section of the parameters intended for that server.

Again, this is not true.  Rather, each sever will presumably ignore any
settings not under its own "namespace".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58894; Package emacs. (Thu, 03 Nov 2022 13:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 58894 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>, João Távora
 <joaotavora <at> gmail.com>
Cc: 58894 <at> debbugs.gnu.org
Subject: Re: bug#58894: Comments on Eglot manual
Date: Thu, 03 Nov 2022 15:51:51 +0200
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Date: Sun, 30 Oct 2022 12:05:27 +0100
> 
> Find below some comments on the "Customizing Eglot" section of the manual:
> 
> > [...] via the variable ‘eglot-workspace-configuration’.  Eglot sends the
> > portion of the settings contained in this variable to each server for
> > which such settings were defined in the variable.
> 
> This is not true.  The entire `eglot-workspace-configuration' is sent to
> the server; presumably, severs ignore everything which is not under its
> own prefix, but that's just a convention.
> 
> > JSON values ‘true’, ‘false’, ‘null’ and ‘{}’ are represented by the
> > Lisp values ‘t’, ‘:json-false’, ‘nil’, and ‘eglot-{}’, respectively.
> 
> Unless something has been renamed recently, it's `eglot--{}', not
> `eglot-{}'.
> 
> >    Alternatively, the same configuration could be defined as follows:
> > 
> >      ((nil
> >        . ((eglot-workspace-configuration
> >            . (:pylsp (:plugins (:jedi_completion (:include_params t
> >                                                   :fuzzy t)
> >                                 :pylint (:enabled :json-false)))
> >               :gopls (:usePlaceholders t))))))
> 
> This is more or less obvious, if you know how dir-local variables work.
> So I would suggest mentioning a different configuration method:
> 
> Alternatively, you can set a default workspace configuration globally by
> adding the following to your init file:
> 
>        (setq-default
>          eglot-workspace-configuration
>          '(:pylsp (:plugins (:jedi_completion (:include_params t
>                                                :fuzzy t)
>                              :pylint (:enabled :json-false)))
>            :gopls (:usePlaceholders t))
> 
> 
> 
> >    This is an equivalent setup which sets the value for all the
> > major-modes inside the project; Eglot will use for each server only the
> > section of the parameters intended for that server.
> 
> Again, this is not true.  Rather, each sever will presumably ignore any
> settings not under its own "namespace".

João, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58894; Package emacs. (Thu, 03 Nov 2022 16:10:02 GMT) Full text and rfc822 format available.

Message #11 received at 58894 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58894 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#58894: Comments on Eglot manual
Date: Thu, 3 Nov 2022 16:08:41 +0000
[Message part 1 (text/plain, inline)]
Hello, my comments:

On Thu, Nov 3, 2022, 13:51 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Augusto Stoffel .
> >
> > This is not true.  The entire `eglot-workspace-configuration' is sent to
> > the server; presumably, severs ignore everything which is not under its
> > own prefix, but that's just a convention.
>

Augusto is correct. His phrasing is acceptably clear for the manual imo.

> > JSON values ‘true’, ‘false’, ‘null’ and ‘{}’ are represented by the
> > > Lisp values ‘t’, ‘:json-false’, ‘nil’, and ‘eglot-{}’, respectively.
> >
> > Unless something has been renamed recently, it's `eglot--{}', not
> > `eglot-{}'.
>

Something has been renamed recently. eglot--{} is an alias.

> >    Alternatively, the same configuration could be defined as follows:
> > >
> > >      ((nil
> > >        . ((eglot-workspace-configuration
> > >            . (:pylsp (:plugins (:jedi_completion (:include_params t
> > >                                                   :fuzzy t)
> > >                                 :pylint (:enabled :json-false)))
> > >               :gopls (:usePlaceholders t))))))
> >
> > This is more or less obvious, if you know how dir-local variables work.
>

Many people don't, judging from a substantial amount of interactions on
this topic.

> So I would suggest mentioning a different configuration method:
> >
> > Alternatively, you can set a default workspace configuration globally by
> > adding the following to your init file:
> >
> >        (setq-default
> >          eglot-workspace-configuration
> >          '(:pylsp (:plugins (:jedi_completion (:include_params t
> >                                                :fuzzy t)
> >                              :pylint (:enabled :json-false)))
> >            :gopls (:usePlaceholders t))
>

This is purposedly not mentioned because it is not recommended and
confusing. Workspace settings are project-specific by definition. Your idea
probably works, but is better implemented as initializationOptions,
command-line switches or other means of configuring the server
independently of the workspace it is meant to operate on.

> >    This is an equivalent setup which sets the value for all the
> > > major-modes inside the project; Eglot will use for each server only the
> > > section of the parameters intended for that server.
> >
> > Again, this is not true.  Rather, each sever will presumably ignore any
> > settings not under its own "namespace".
>

Yes, that is the correct idea.

João, any comments?
>

See above.

Also, I think this information should migrate to a separate sub-section,
alongside a sub-section devoted to the "workspace folders" topic.

João

>
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 06 Nov 2022 07:48:02 GMT) Full text and rfc822 format available.

Notification sent to Augusto Stoffel <arstoffel <at> gmail.com>:
bug acknowledged by developer. (Sun, 06 Nov 2022 07:48:02 GMT) Full text and rfc822 format available.

Message #16 received at 58894-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 58894-done <at> debbugs.gnu.org, arstoffel <at> gmail.com
Subject: Re: bug#58894: Comments on Eglot manual
Date: Sun, 06 Nov 2022 09:47:10 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Date: Thu, 3 Nov 2022 16:08:41 +0000
> Cc: Augusto Stoffel <arstoffel <at> gmail.com>, 58894 <at> debbugs.gnu.org
> 
> Hello, my comments:
> 
> On Thu, Nov 3, 2022, 13:51 Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>  > From: Augusto Stoffel .
>  > 
>  > This is not true.  The entire `eglot-workspace-configuration' is sent to
>  > the server; presumably, severs ignore everything which is not under its
>  > own prefix, but that's just a convention.
> 
> Augusto is correct. His phrasing is acceptably clear for the manual imo.
> 
>  > > JSON values ‘true’, ‘false’, ‘null’ and ‘{}’ are represented by the
>  > > Lisp values ‘t’, ‘:json-false’, ‘nil’, and ‘eglot-{}’, respectively.
>  > 
>  > Unless something has been renamed recently, it's `eglot--{}', not
>  > `eglot-{}'.
> 
> Something has been renamed recently. eglot--{} is an alias.
> 
>  > >    Alternatively, the same configuration could be defined as follows:
>  > > 
>  > >      ((nil
>  > >        . ((eglot-workspace-configuration
>  > >            . (:pylsp (:plugins (:jedi_completion (:include_params t
>  > >                                                   :fuzzy t)
>  > >                                 :pylint (:enabled :json-false)))
>  > >               :gopls (:usePlaceholders t))))))
>  > 
>  > This is more or less obvious, if you know how dir-local variables work.
> 
> Many people don't, judging from a substantial amount of interactions on this topic.
> 
>  > So I would suggest mentioning a different configuration method:
>  > 
>  > Alternatively, you can set a default workspace configuration globally by
>  > adding the following to your init file:
>  > 
>  >        (setq-default
>  >          eglot-workspace-configuration
>  >          '(:pylsp (:plugins (:jedi_completion (:include_params t
>  >                                                :fuzzy t)
>  >                              :pylint (:enabled :json-false)))
>  >            :gopls (:usePlaceholders t))
> 
> This is purposedly not mentioned because it is not recommended and confusing. Workspace settings are
> project-specific by definition. Your idea probably works, but is better implemented as initializationOptions,
> command-line switches or other means of configuring the server independently of the workspace it is meant
> to operate on.
> 
>  > >    This is an equivalent setup which sets the value for all the
>  > > major-modes inside the project; Eglot will use for each server only the
>  > > section of the parameters intended for that server.
>  > 
>  > Again, this is not true.  Rather, each sever will presumably ignore any
>  > settings not under its own "namespace".
> 
> Yes, that is the correct idea.
> 
>  João, any comments?
> 
> See above. 

Thanks, I fixed the wording regarding sending of the settings.

> Also, I think this information should migrate to a separate sub-section, alongside a sub-section devoted to the
> "workspace folders" topic.

The eglot-workspace-configuration settings are an important part of
the Eglot customization, so I don't see why we should move that into a
separate section.  It sounds unnatural to me.

I consider this bug done, so I'm closing it.

Thanks for the feedback.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Dec 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 198 days ago.

Previous Next


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