From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#58894: Comments on Eglot manual Date: Thu, 3 Nov 2022 16:08:41 +0000 Message-ID: References: <87a65dtvuw.fsf@gmail.com> <83sfj06t8o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000074882f05ec932c7e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15910"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58894@debbugs.gnu.org, Augusto Stoffel To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 03 17:10:26 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqcnR-00040Z-RP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Nov 2022 17:10:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqcnB-0005tx-Lg; Thu, 03 Nov 2022 12:10:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqcn8-0005qI-Ez for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 12:10:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqcn4-0006xJ-Mi for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 12:10:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqcn4-0000cM-Io for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 12:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Nov 2022 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58894 X-GNU-PR-Package: emacs Original-Received: via spool by 58894-submit@debbugs.gnu.org id=B58894.16674917412288 (code B ref 58894); Thu, 03 Nov 2022 16:10:02 +0000 Original-Received: (at 58894) by debbugs.gnu.org; 3 Nov 2022 16:09:01 +0000 Original-Received: from localhost ([127.0.0.1]:50073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqcm5-0000ab-2b for submit@debbugs.gnu.org; Thu, 03 Nov 2022 12:09:01 -0400 Original-Received: from mail-oa1-f45.google.com ([209.85.160.45]:37456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqcm3-0000aO-ER for 58894@debbugs.gnu.org; Thu, 03 Nov 2022 12:09:00 -0400 Original-Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-12c8312131fso2687344fac.4 for <58894@debbugs.gnu.org>; Thu, 03 Nov 2022 09:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MsCRVkHLImPm0z6skGS2Dv3uMHkOTllz022C2Ez3c50=; b=VjPafGXDbCTH48tFvLGS6Us3fhm9IbIk0q+HG+SBpIm39W+PTxCWtqxa1o/Ey6zOoh 3P2wqGU2sg2qZxXKCXBOrToZjEJvDnJ78hRjmdTrIOays2kAdyBJ8ba64MwrwiryB4Gv SZs7dSVFb3T8Bc7eASTu7JyuMAGKKLM9Hm0Ts9GhKOq+8bs6E03wYsCfSGhCbVpxNUUL xURxEkzfIGPVOCLZQ/nyeh/mAXmBoVFkJ/BpDgqbEWeWOAyRIcXFSLgK2gMOY8grU+1P oXfXwF0M9SLaHfQGcleykbez/OaQALA8pBydLGNZusnkq2Mnf7GBdm5IMrLJ7vosp+WV S3CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MsCRVkHLImPm0z6skGS2Dv3uMHkOTllz022C2Ez3c50=; b=YI6uZrdfY7l2ML0CpCJBnkndcWRh6Sa7eg9/R1rH5M6VR94+Rk/4fBsRDfg2T3K+Bv sqR5cJYBqxJRFYUwBrXCi+75Rboo7mwc6t+dIkSNQ3SncK6Ly4dNCvj1bZfW+DU3lrI4 XG84Q19TFVkI1j40mRrgRu2eKFXyFYZPN6JrUjdZPJm2I1Df3gkE1mUGbVzE6luCOwxf OlkM80e7iLxEbI17vX9F5UvmaucH4yFolNzhV3MnoQxiyCGU74sY0nWfOfMHMXjMyVVM QgZTfpH0pNRJ15BYl9KrdrKSLp36O4gtdBOxWLSOJCUX9EudAEbe4OWxSiF/dgD02DBV LvZA== X-Gm-Message-State: ACrzQf2hkDxbycm54fmFWasjbdrpZxbOu+uVKWrvB7f7e0Y4YRWEsnRZ J5+4yDOnhO/Ov2A8sankGaG4ZdrvlklpI7ESRfI= X-Google-Smtp-Source: AMsMyM5D68m/g93qEQg/nfsV6eFWL6AfmXR6DiLBzw1iWt4A+oY2U+LQMjcwFYk4w5s6mft+dOuiyL/IE/AcWaVG1tQ= X-Received: by 2002:a05:6870:e242:b0:13b:d561:ad02 with SMTP id d2-20020a056870e24200b0013bd561ad02mr18842202oac.215.1667491733733; Thu, 03 Nov 2022 09:08:53 -0700 (PDT) In-Reply-To: <83sfj06t8o.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246983 Archived-At: --00000000000074882f05ec932c7e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, my comments: On Thu, Nov 3, 2022, 13:51 Eli Zaretskii wrote: > > From: Augusto Stoffel . > > > > This is not true. The entire `eglot-workspace-configuration' is sent t= o > > 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 =E2=80=98true=E2=80=99, =E2=80=98false=E2=80=99, =E2=80=98n= ull=E2=80=99 and =E2=80=98{}=E2=80=99 are represented by the > > > Lisp values =E2=80=98t=E2=80=99, =E2=80=98:json-false=E2=80=99, =E2= =80=98nil=E2=80=99, and =E2=80=98eglot-{}=E2=80=99, 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 b= y > > 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 t= he > > > 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=C3=A3o, 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=C3=A3o > --00000000000074882f05ec932c7e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello, my comments:

On Thu, Nov 3, 2022, 13:51 Eli Zare= tskii <eliz@gnu.org> wrote:
> From: Augusto Stoffel .
>
> This is not true.=C2=A0 The entire `eglot-workspace-configuration'= is sent to
> the server; presumably, severs ignore everything which is not under it= s
> own prefix, but that's just a convention.

Augusto is correct. His p= hrasing is acceptably clear for the manual imo.

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

Something has been renamed recently. eglot--{} is an al= ias.

> >=C2=A0 =C2=A0 Alternatively, the same configuration could be defin= ed as follows:
> >
> >=C2=A0 =C2=A0 =C2=A0 ((nil
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 . ((eglot-workspace-configuration
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 . (:pylsp (:plugins (:je= di_completion (:include_params t
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:fuzzy t)
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:pylint (:enabled :json= -false)))
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:gopls (:us= ePlaceholders 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 o= n 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:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq-default
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 eglot-workspace-configuration
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(:pylsp (:plugins (:jedi_comple= tion (:include_params t
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 :fuzzy t)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :pylint (:enabled :json-false)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :gopls (:usePlaceholders t))<= br>

T= his 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 sw= itches or other means of configuring the server independently of the worksp= ace it is meant to operate on.

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

Yes, that is the corr= ect idea.

Jo=C3=A3o, any comments?

=
See above.=C2=A0

<= div dir=3D"auto">Also, I think this information should migrate to a separat= e sub-section, alongside a sub-section devoted to the "workspace folde= rs" topic.

Jo=C3=A3= o
--00000000000074882f05ec932c7e--