From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Making `eglot-server-programs' a custom variable? Date: Wed, 09 Nov 2022 20:49:07 +0000 Message-ID: <87cz9v97lo.fsf@posteo.net> References: <86fservpri.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13983"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Arash Esbati Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 09 21:49:36 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oss0s-0003RG-L9 for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Nov 2022 21:49:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oss0Y-0003uO-9A; Wed, 09 Nov 2022 15:49:14 -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 1oss0U-0003tv-Ss for emacs-devel@gnu.org; Wed, 09 Nov 2022 15:49:11 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oss0T-0007z6-EX for emacs-devel@gnu.org; Wed, 09 Nov 2022 15:49:10 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BF425240104 for ; Wed, 9 Nov 2022 21:49:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668026947; bh=4tejmd/CWnqiAPMEuIQ2q5d1pugUDBeqtsOiFm2mDrY=; h=From:To:Cc:Subject:Date:From; b=GLhGy5Aidlafv2WQMESLbLlcC6zf53kRAeti/2GQ/E6z3LEheZsrMkRrsPa1RLvww QU9XgVDHcyzmTFsPzhOst/Gt/p/Zj4J96XcSw8ZhuEsBWCGcTpjE/uPKz7sUDtQvdq 1nZ0lap/3bp6x/h84MvrGDJ+x+T8SZVZ3mawPzVHO7Xtfe5kQQeS7jTRovwiIviJxI 9fBAPu6rMHHJL5rN0Ly3p9kcIPL/Ov+Dd1/sbiZ2RYAMvFWv8pVw2x0ZNDoihsxUAc SlFZ5Ao529daTXY6NFueEoDjjZmH8/8X82DPEMCZqzPE5qdZrOHenylppCzohH1Qdi nJe6ucO0VTZ1g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N6xsH0Z8Jz9rxK; Wed, 9 Nov 2022 21:49:07 +0100 (CET) In-Reply-To: <86fservpri.fsf@gnu.org> (Arash Esbati's message of "Wed, 09 Nov 2022 21:25:53 +0100") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299433 Archived-At: Arash Esbati writes: > Hi all, > > I tried eglot only once and I had to add a lsp-server to > `eglot-server-programs'. From this experience, is there a plan to make > this a custom variable? If not, I suggest to change the example in > eglot manual from > > (add-to-list 'eglot-server-programs > '(foo-mode . ("fools" "--stdio"))) > > to > > (with-eval-after-load 'eglot > (add-to-list 'eglot-server-programs > '(foo-mode . ("fools" "--stdio")))) > > for those who will copy&paste this into their init files and then wonder > why it throws an error. How would making `eglot-server-programs' help in that respect? If the `defvar' were just to be replaced by a `defcustom', the result would still just be a variable, that couldn't be `add-to-list'ed before it is loaded. >From what I see `add-to-list' has no special handling of user options. > Best, Arash I've CC'ed Jo=C3=A3o.