From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Explain a bit more on how to configure language server in Eglot's manual Date: Wed, 8 Mar 2023 16:03:16 +0000 Message-ID: References: <86sfeisu49.fsf@stephe-leake.org> <87356gvkkb.fsf@gmail.com> <87r0tz8jag.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000034856405f665ab8a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39823"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , Yuan Fu , Stephen Leake , Emacs developers To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 08 17:04:17 2023 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 1pZwH2-000AAq-24 for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Mar 2023 17:04:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZwGK-00012h-HZ; Wed, 08 Mar 2023 11:03:32 -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 1pZwGJ-00012Z-3q for emacs-devel@gnu.org; Wed, 08 Mar 2023 11:03:31 -0500 Original-Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZwGH-000478-HV for emacs-devel@gnu.org; Wed, 08 Mar 2023 11:03:30 -0500 Original-Received: by mail-ot1-x329.google.com with SMTP id e26-20020a9d6e1a000000b00694274b5d3aso9241003otr.5 for ; Wed, 08 Mar 2023 08:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678291408; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EiI8FpfJE4Z+2nlaGgCz8bsjRFpvnFUn8Aoz/3VLuhY=; b=fKPMcV/1rKiRpko2Xq8Fu2MsrXxvR9wCghOScLkifjp1xvVqmrGGZXP0rE0y82Ky6V JK0tWBGWXKcE59cpxf4QEwh/JiPC6mE2Xu/rbdOyG4G11dj8JZczIjWn3VHbiKWLPvdO jjY96DwghrolxUptUy6QLtRS4zSJ6E2ouF2pCrJ1QmPH42maQwfmqpfhTIoa98g/Cv08 iExaqG9Jh8VJ4v/Oi2WOrjrj9+INuUr8zKYgzhasR8vu8EGbtO10thx5fb0JGl1DBIEM Cju0PAcfmZrSJvGOYCb5gl+ySFMLLYfJzpul20Ke17zK+zfEScubRF9lDIdt6zu5fa7U r/Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678291408; 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=EiI8FpfJE4Z+2nlaGgCz8bsjRFpvnFUn8Aoz/3VLuhY=; b=QghZFn4QCUXC/QWox+Vf50kJV9rsAEt6dyv7QhsxcFpRcbITZlhrQn/ZX4UwlNksol FACpfgPozhj3ztV7G69DRardFQeG6LLx93eXJ/eRxKXsEDEilIvLaJrp5nDePpQ5mCZv 3eJ020d7ul8k4RIg+G2xO6ObFVsqK0D/JuzFo3gQr0hQQtczyYn1x6qwhqvVoL1CpYfn aFrPIW88MqAyH4n9erhdKReHmbKmnTlow7gZxM3XyJAY3/oN98iAdTIjvi8p7DWLClsJ NTFWSCTEhBienD4PVqojWc18PrVQcPBcLKhn38oSM0lVqV9CCDrBt8y2+wlui5sM6CSg bb0A== X-Gm-Message-State: AO0yUKVYYWh5CqUKsMT6WbLTHPirWwm8pSXfE5BZ3Iw3JQRMphYpcBna vwgR04PfWeXMr5cmfiKx8T2ybAOWJ6g15wymbgU= X-Google-Smtp-Source: AK7set/skMnmG2Pu1cayGAwcFfxOjWR2k+DOfxe+W+ys97NItDdq2eOy1hsTtOILUPBhPVYByF/psPCBuBBKnxkWDQ0= X-Received: by 2002:a05:6830:26c6:b0:68b:e0dc:abc7 with SMTP id m6-20020a05683026c600b0068be0dcabc7mr5784339otu.4.1678291408027; Wed, 08 Mar 2023 08:03:28 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x329.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:304144 Archived-At: --00000000000034856405f665ab8a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 8, 2023, 15:52 Yuri Khan wrote: > On Wed, 8 Mar 2023 at 22:27, Jo=C3=A3o T=C3=A1vora = wrote: > > OK. So if someone puts this function elsewhere and Eglot > > can take advantage, that's fine and dandy. Where would you > > put a dotted-settings-to-plist function? > > I do not know if I would at all. As I said, it is an informal > convention. It skirts a number of corner cases, and as soon as you try > to build a sound implementation, you are forced to address those, > which breeds incompatible dialects. > > (As a few examples, on the first sight, it looks as if the dotted path > is a dot-separated concatenation of unquoted object keys going from > the root object. What do you do if one of the keys contains a dot? a > space? What if one of the keys being traversed is an empty string? > What if you need to traverse an array?) Right, i see your point. Then I'd say again that it maybe belongs in Eglot because -- presumably -- LSP options objects don't incur in those edge cases. I just expect people to be able to read > =E2=80=98rust-analyzer.assist.emitMustUse (default: false)=E2=80=99 in do= cumentation > and write > > { > "rust-analyzer": { > "assist": { > "emitMustUse": true > } > } > } > > in a JSON config or > > rust-analyzer: > assist: > emitMustUse: true > > in YAML. > Indeed. And why not a plist, since we're in lisp land? :) Jo=C3=A3o > --00000000000034856405f665ab8a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Mar 8, 2023, 15:52 Yuri Khan <yuri.v.khan@gmail.com> wrote:
On Wed, 8 Mar 2023 at 22:27, Jo=C3=A3o T=C3=A1vor= a <joaotavora@gmail.com> wrote:

> OK.=C2=A0 So if someone puts this function elsewhere and Eglot
> can take advantage, that's fine and dandy.=C2=A0 Where would you > put a=C2=A0 dotted-settings-to-plist function?

I do not know if I would at all. As I said, it is an informal
convention. It skirts a number of corner cases, and as soon as you try
to build a sound implementation, you are forced to address those,
which breeds incompatible dialects.

(As a few examples, on the first sight, it looks as if the dotted path
is a dot-separated concatenation of unquoted object keys going from
the root object. What do you do if one of the keys contains a dot? a
space? What if one of the keys being traversed is an empty string?
What if you need to traverse an array?)

Right, i see your point. Then I'd sa= y again that it maybe belongs in Eglot because -- presumably -- LSP options= objects don't incur in those edge cases.

I just expect people to be able to read
=E2=80=98rust-analyzer.assist.emitMustUse (default: false)=E2=80=99 in docu= mentation
and write

=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 "rust-analyzer": {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "assist": {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "emitMustUse": true
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 }

in a JSON config or

=C2=A0 =C2=A0 rust-analyzer:
=C2=A0 =C2=A0 =C2=A0 assist:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 emitMustUse: true

in YAML.

Indeed.=C2=A0 And why not a plist, since we're in lisp land? = :)

Jo=C3=A3o
--00000000000034856405f665ab8a--