From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58894: Comments on Eglot manual Date: Sun, 06 Nov 2022 09:47:10 +0200 Message-ID: <831qqg34ox.fsf@gnu.org> References: <87a65dtvuw.fsf@gmail.com> <83sfj06t8o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17784"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58894-done@debbugs.gnu.org, arstoffel@gmail.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 06 08:48:25 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 1oraOG-0004LH-Vf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Nov 2022 08:48:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oraNx-0003CX-IB; Sun, 06 Nov 2022 02:48:05 -0500 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 1oraNv-0003BL-Gp for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2022 02:48:03 -0500 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 1oraNv-0002oG-7t for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2022 02:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oraNu-0001Vl-Ny for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2022 02:48:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Nov 2022 07:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 58894 X-GNU-PR-Package: emacs Mail-Followup-To: 58894@debbugs.gnu.org, eliz@gnu.org, arstoffel@gmail.com Original-Received: via spool by 58894-done@debbugs.gnu.org id=D58894.16677208605661 (code D ref 58894); Sun, 06 Nov 2022 07:48:02 +0000 Original-Received: (at 58894-done) by debbugs.gnu.org; 6 Nov 2022 07:47:40 +0000 Original-Received: from localhost ([127.0.0.1]:58599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oraNX-0001TE-JA for submit@debbugs.gnu.org; Sun, 06 Nov 2022 02:47:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oraNT-0001St-Cs for 58894-done@debbugs.gnu.org; Sun, 06 Nov 2022 02:47:38 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oraNN-0002lV-GB; Sun, 06 Nov 2022 02:47:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rdkA6CH0EnyjUb4iPpY/OUX0jR6lQzPggnE8bys0lCE=; b=S4aKkk0h1FwbkvtqEglQ 8gt3ZW9fcuQnRj7aj3koCe9DqjPfjm1eKUK5oVFG3RA5nse2Zvvx4iPX6t2GSwl+D6K8ShPtedsqq /7AKTSg59As2XAsEbXaBvZ3nxXwiQG7x42kx9ZFQhjm7ZBwWlc1PpfCDcn14Ew+ND4sfLJ9u0ZncV CuQ7Qd5eHrjU1169fd/S21VVI0AP4CokxSJ36cf7WSyvY+Jt9gNrise3tF98Uv0h4fz5XCGm7rzDV NXzhoecO88DOiMt44UDa1TW5O77f2WXRyMZD6VzpT51vh0avVqkIg3tdN2qL586Gj1ad75E17aI3+ P4hF/bsCuk6pbA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oraNM-0002kf-QH; Sun, 06 Nov 2022 02:47:29 -0500 In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Thu, 3 Nov 2022 16:08:41 +0000) 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:247190 Archived-At: > From: João Távora > Date: Thu, 3 Nov 2022 16:08:41 +0000 > Cc: Augusto Stoffel , 58894@debbugs.gnu.org > > 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 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.