From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felician Nemeth Newsgroups: gmane.emacs.devel Subject: Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]] Date: Tue, 26 Jul 2022 10:55:05 +0200 Message-ID: <87bktcgsnq.fsf@betli.tmit.bme.hu> References: <87leslpow2.fsf@gmail.com> <87v8rpntiv.fsf@gmail.com> <83sfmtjjy8.fsf@gnu.org> <87fsitnpxd.fsf@gmail.com> <83k085jgxr.fsf@gnu.org> <87tu77vq1a.fsf@eve> <874jz6mj6b.fsf@gmail.com> <87r12aypas.fsf@yahoo.com> <87h735zp5o.fsf@yahoo.com> <87r129h0nn.fsf@betli.tmit.bme.hu> <87ilnlxtqz.fsf@gmail.com> <87mtcxgrto.fsf@betli.tmit.bme.hu> <875yjlxkqn.fsf@gmail.com> <87ilnkgumc.fsf@betli.tmit.bme.hu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34436"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 26 10:59:11 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 1oGGPH-0008mA-Oz for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 10:59:11 +0200 Original-Received: from localhost ([::1]:45394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGGPG-00065p-DG for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 04:59:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGGLP-0002YB-LA for emacs-devel@gnu.org; Tue, 26 Jul 2022 04:55:13 -0400 Original-Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:33715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGGLM-0001Mc-Jw for emacs-devel@gnu.org; Tue, 26 Jul 2022 04:55:11 -0400 Original-Received: by mail-ed1-x529.google.com with SMTP id o13so1965821edc.0 for ; Tue, 26 Jul 2022 01:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:face:mime-version; bh=a3chMopdI/39yuyriTfcmpaW6RtcqHdl2S9/RCwRGBQ=; b=MmoeBdsbwowGVWPlNZYu0YpwLgJHWhRveYQOsv9LrfF3CrKXdQIEp5lTy0Y+QJBd4M f0UGTCnhSRYl5QqAXYyl8uJK4P9feHQpbX5T9vRhx1ROI/sdy1Eb3YdcRCtl1Pl7q6we +gZvgP+nFmaRcpc0ruh4QZLn9QQ8Ou7zZmAcF+p0quwniji4QUtbGLU0M1A3kBhjU2ky B/KdZOwiq4je3muuj0R96kk4xoiYEOrka2eS4N0WeZcPfAtCtz9tCMt9lgDC6A0LQOKd e0f9bt4lLLDathqcd8GBJMq+CgpXQJ3GXBDieX0TvYIw01bmmc1BiNfEGJ0aifLDyizQ wk6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:face:mime-version; bh=a3chMopdI/39yuyriTfcmpaW6RtcqHdl2S9/RCwRGBQ=; b=G+ocrzbMz1bLEyH7FGmxA9SCmGi89TWkS0XxdPl6sWAzk7IN9KGxvGDX7wJNf+xweE EzjAHgjKWU5UgztRM8bUBYMnzOWIysvE9McsYZbhfF6pq5ONWv29qiln/RY/O1iwp3JL Pq/8U1LD3KpnmzWxblb8J9U8E/BT/sEZVSplVWcJE3wsCMFFRl4JUbniE5HZH4YRXOGA FP+AiO0/a4bxtln4KenJ75jDGAuFbfbU8rgj+6Olo4tRb1cgfiL4ntEPfg+JysyHDHEu 2aD/ke/o3n9m9sfTSMeUw1btfjWu5pyv4jTn8MricCmRpDs/LVyVZjavbOGEn0qJquGn T6Xw== X-Gm-Message-State: AJIora8HKKz/Jjhz1GYInXdnMTbYnuEd/VHkdPaNQqH2ilXDDPH7r0aZ z2UkiyXjOZHQOnGSrWHWgHrGG9/Pxks= X-Google-Smtp-Source: AGRyM1v8vOiArPoUz1/GyINDO6j5ooazMv1kH4v3jpl0AqcrsqSMU1CkQD9iIdZchm3G3hVJ+nHWuA== X-Received: by 2002:a05:6402:5008:b0:437:7f01:82a with SMTP id p8-20020a056402500800b004377f01082amr17455833eda.220.1658825706217; Tue, 26 Jul 2022 01:55:06 -0700 (PDT) Original-Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id n18-20020a05640205d200b0043b7917b1a4sm8277901edx.43.2022.07.26.01.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 01:55:05 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Tue, 26 Jul 2022 09:21:21 +0100") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEU2EgDVmFNHKAa4dz4q AwCDUSH2zWrE61tmAAACeklEQVQ4jU2UwY7jIAyGEZN5ABSFc9Ytcx6K6DmqmHsD8tyZKrz/I+xv yI6WKlHlj982tomiVckiWrUrgRU5jlqMpJKCkch5W419DQAiQGHDxdrWmm0/2kXCApiUmrZLq20s cjexq3VL25QuxjY7wOcJVEpb+jLeGLAK+OMyaa1hx9rFbkwHFWBVA2y8w1wHaLE7GuDdw5cEuOM5 SLIdrpwBkN0ezwI7nYoiilqthbcYc89KgC5+NnaOHGbZz0T6BCEgOLJ0vmYXuNdPAIXgDZJhF2Yu fjnPNwAsoUTUN/P8q3AAyz4zB/xmifEfiIbvS4jh7b7QqZiSm4MJC5kXNpCRaOsoyQXAMN2XCJfs j94NKfo7ACKUEgKE3y+Sg4jibUZ1A0jgYpxtvYMC3gHaHPq6x32ACeALIZoZxB+l9VrRNIA1ncRg wwC8pvQIvYO+a2yt3VXMVyli6L0VV6aOrJa4CpilVQA+eHt0xavk61akih5BUMay/0BAqu783C5h FifY/3QsAIoWYk6PgpwAzLI652+96e2IfN2cF+BD1uT23F21Ghh5OUl4RlO15oh5A2iv+Zk2wsjZ 2DtB5Sm3A4P0+kyb2vs4iEW7G9ohoN3Stl2kVat6MCkXldo6OKaE8P6GhmrKKxWZXQH1iklhhn+d iVeNf6mDdkV0ltFwApRbp+kXSGBFHGV2aPqnIIyQyzhD5n47khqKI08bIapcas4O+hPkct20NAEv ALRuZFUp3PrnQSAm+4lTdHCsYYZ/nGqQrM5z3NS3zefFxkfFPRFbsjpIfbTlvF3ibpVZQ9nzqv60 F/KXSRLJ1AGappJulZll70N/qz6EfwEOCdYOuTHAzAAAAABJRU5ErkJggg== Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=felician.nemeth@gmail.com; helo=mail-ed1-x529.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:292670 Archived-At: >> > Yes, I think this is a great idea to allow the user to configure >> > server-specific things easily and automatically save it >> > .dir-locals.el. >> > >> > The question is how. Not sure if variables is the way to go. >> >> Rust-analyzer can emit the definition of its configuration variables as >> a JSON schema. There are toml and yaml servers that hopefully >> understand this schema description. >> >> So one possibility for Eglot is to help the user to edit a >> project/rust.toml or a global ~/.emacs.d/eglot/rust.toml file and >> arrange to call eglot-signal-didChangeConfiguration when the user saves >> the file. >> > > I don't disagree with this, though it seems different from your first idea. > When is the .dir-locals.el written in your example, or were you imagining > a use with `dir-locals-set-class`? My first idea was to use `customize` to set project-specific configuration variables. This doesn't seem possible or easy. > Regardless, if this works, why shouldn't it be rust-mode.el's job to do > exactly > this? Editing "toml" files is outside the scope of LSP. Yes, but if there was an LSP request that returned the server's configuration schema, then Eglot could take care it independently of the major-mode. Unfortunately, no such LSP request has been proposed at the moment. But there was an attempt: https://github.com/microsoft/language-server-protocol/issues/467 As you said, standardization is hard. So this approach quite hypothetical.