From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Brieiev Newsgroups: gmane.emacs.devel Subject: Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]] Date: Mon, 25 Jul 2022 19:07:57 +0300 Message-ID: <87edy9i3aa.fsf@gmail.com> References: <87leslpow2.fsf@gmail.com> <83ilnpl8e0.fsf@gnu.org> <874jz9peq0.fsf@gmail.com> <837d45l6ge.fsf@gnu.org> <87zgh1nyo6.fsf@gmail.com> <831qudl1k3.fsf@gnu.org> <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> 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="33219"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Po Lu , Stefan Monnier , Stefan Kangas , Eli Zaretskii , emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 25 18:12:16 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 1oG0gq-0008TZ-3L for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 18:12:16 +0200 Original-Received: from localhost ([::1]:58758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oG0go-0005z2-UI for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 12:12:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG0cp-0001Vn-RJ for emacs-devel@gnu.org; Mon, 25 Jul 2022 12:08:07 -0400 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:43790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oG0cn-0003il-Ct; Mon, 25 Jul 2022 12:08:07 -0400 Original-Received: by mail-lj1-x22a.google.com with SMTP id p22so3883243lji.10; Mon, 25 Jul 2022 09:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:mail-followup-to:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=wJ46wwv91iiXCr45c/AU5E83R+gxKhS82Y2wVE1+c5c=; b=Lhq11odMJYZPverEVOP9nR+i6cXfEKWbB4/v7nunHo9E8qPszaN6Od6PFuXHUdCHQZ GW4RpsWv1XtaZcvGbgC+X7jN+mhDt4mqfL8oTXrk+0SADmWp15OlYKeFSfkx92kVr6d5 1AeUMn86qohbHMaglz1WpUoBE65V5mnZBIVSX5mhqLbvnWj2rqC1sOqqIot3FtT9aeun B7CFYZIg5JxBbj/y2vwxN+SMfOVVdKAPuYiAJknC4hJ8uX16Y88K/T1EYxfFtXrzt4rW ULPwkAPuRPuCWxNqA+8zV71Uie3aKuLAQpmw7Taz4/yyau8Al/iYuhhe4E5LLIXRVtiQ Ll1A== 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:in-reply-to:references :mail-followup-to:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=wJ46wwv91iiXCr45c/AU5E83R+gxKhS82Y2wVE1+c5c=; b=i/8TdVi4LkwQntu34XYZKb54kDPcn8JmkFPOIiD0QsEmucM20kNNYkIjBQ8elIpR5T EU8F4M15KBsN7qIBYKfBDa4T30tUzf8QGoCy++u5plxHUav+S8ZqNUX4ObVxoD7NhlOK aeywMJV+o2xN2KhwLr44UgBBJcgw3Q2QIlWwoLdWgpopfu9iRF6QU4ouZMytKaTR+UQE UXzethj0ItiAz9tCJXEHi7Py02jM6SVz2Z0zNgTESQnUubEztxY8qTZ3o7ezMux1j/Mc 4XcmH/A+ra1gb0WvGMpa//sjooX+lbNuvxay49N5RGj8UFxN4n+tkdNVb+G/P5zN/hnE /qAQ== X-Gm-Message-State: AJIora9hdQ96NurpFXwSczmH1nNl98QupQuvi+Ts3c7jlQOBbkQhTRQq TiG/URwjs9epubPFpNi8/ZLN4yQ4l5c= X-Google-Smtp-Source: AGRyM1sNNiiwAqFe4eOzPdOjvU37k2NBR1MPJgt2oaCUY6vZ3D/dF+TBldrSH9+iWMJeDKukLoGB5g== X-Received: by 2002:a2e:9e52:0:b0:25e:3cd:30c3 with SMTP id g18-20020a2e9e52000000b0025e03cd30c3mr2226901ljk.306.1658765279944; Mon, 25 Jul 2022 09:07:59 -0700 (PDT) Original-Received: from thinkmax (host-176-37-1-68.b025.la.net.ua. [176.37.1.68]) by smtp.gmail.com with ESMTPSA id p3-20020ac24ec3000000b0048a88c07bcdsm814093lfr.20.2022.07.25.09.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 09:07:59 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Mon, 25 Jul 2022 12:01:56 +0100") Mail-Followup-To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Po Lu , Stefan Monnier , Stefan Kangas , Eli Zaretskii , emacs-devel Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=max.brieiev@gmail.com; helo=mail-lj1-x22a.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:292641 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > One of the points of bringing Eglot into core is that it can be used as > a library by other major modes, who are free to build on top of Eglot's A= PI. Thus > language server support becomes somewhat transparent (according to Stefan= 's > recent definition): users don't need to know -- to some reasonable extent= -- that Eglot > as an LSP client is being used, just as they needn't know that tree-sitte= r is being > used to provide, say, a better C++ mode. Conceptually, Eglot matches a single major mode to a specific language serv= er. In some cases this is a limitation, because there are servers that are supposed to handle the project as a whole. This is especially the case in web development. The project may contain various content types: javascript, stylesheets, html, xml, json, typescript, syntax extensions like jsx, and so on. This is where it is preferrable to have a single server instance per a number of major modes. The server may read project configuration file from the project's root directory, or be passed appropriate initialization options during server startup. If major modes were to use Eglot's API in their own ways, wouldn't they step on each other toes - e.g. each one passing conflicting initialization options to the server? Not sure whether Eglot supports this use case, but in the past I wasn't able to get it working.