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: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]] Date: Mon, 25 Jul 2022 13:27:16 +0100 Message-ID: <87ilnlxtqz.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> <87r129h0nn.fsf@betli.tmit.bme.hu> 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="24259"; 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: Felician Nemeth Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 25 14:42:38 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 1oFxPy-0006DL-HW for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 14:42:38 +0200 Original-Received: from localhost ([::1]:55610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFxPw-0000Ym-Da for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 08:42:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFxA0-0001AR-Dw for emacs-devel@gnu.org; Mon, 25 Jul 2022 08:26:09 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:55824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFx9w-0006xK-Kn; Mon, 25 Jul 2022 08:26:07 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id b6so6692584wmq.5; Mon, 25 Jul 2022 05:26: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:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=rxo8oXyJlQiOLjOAp8YLX3VR7QXwa9tMGJt+0YnGL1k=; b=QBIP81VTRn+G1BhfRB0HVD8n2mv1FkLK9bKsgPUd+0LEjNmJTC0bK/mvBnG5DN/B+v u+grMplH9afWueAysbtCquJabM4UoSRdh5+6IkxOJMCLlTstW8v0XPw8y/27lhNfdnj9 k6icLQray7hR6sDq1Ff8gOoUPIyw5MHJV93fZIZLMdetPdLgCmQH8hw/RLJJ21LS+wJb MvWGKZKBuRzwLOt9ocZph4ZyWRSr4vm+mkBwxFSasez6p9ZN3nrK3w6VErxUKptf6U81 0km7zkbJlHfDIfuCA5jvw3IfNZSPRDeJfuOndXjE4SHV1I78mjhFKiP5K+KIUicRJtUC YqzA== 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:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=rxo8oXyJlQiOLjOAp8YLX3VR7QXwa9tMGJt+0YnGL1k=; b=WtyLjnqwz4CxSA+HJW+JpcpgfILPQF0lLv0WkE2b09FlYRfQCctRQcSYknOPjxWLfZ SqRJ15lm+oqCq5W13Jp4t7ChH+YHL2mcfDSdbXj5ebsrAXjrNoRMSTAHTwx0u4Gg9XD3 5PCg8oFGabRELAHcE6Cr8WczPpQQteJZ6RYYwuz/n8whaHwU7l7M6D6HVkdcM6jdiicm XBpaLPsm15CpGQd3wDXwQcRKIxOLIpG3faZauZJs06ZhlbjlbO5j15iPcgpj4KMDgGTI 12bUMBHIQfVMcrb91aFH9NPEN2vWVYUTdWQbvfl55Cmnisu1N2yK4yANLvrLE+ervXMp vhBw== X-Gm-Message-State: AJIora/l3y8n3mfBnc1Cz9VGSwUVI2sAQHLwC2bmIAR8abkCGLxvaAU0 4ankBVjrzzJzngOXwDQayR/NOkga9tc= X-Google-Smtp-Source: AGRyM1t7A6cIikvoJ5fC9yNSPd9xc0+M4x48NEns1NkzsgRqVkLURc1CLRmbzR5Bf3RsyPym8puPXw== X-Received: by 2002:a05:600c:214a:b0:3a3:2369:ccad with SMTP id v10-20020a05600c214a00b003a32369ccadmr21393991wml.118.1658751962365; Mon, 25 Jul 2022 05:26:02 -0700 (PDT) Original-Received: from krug ([87.196.74.31]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b003a2e92edeccsm19393060wmb.46.2022.07.25.05.26.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 05:26:01 -0700 (PDT) In-Reply-To: <87r129h0nn.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Mon, 25 Jul 2022 13:50:04 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32c.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:292625 Archived-At: Felician Nemeth writes: > I don't think the current API is good enough for that. See > https://github.com/joaotavora/eglot/discussions/802#discussioncomment-217= 1239 Really depends on what you consider "that" to be. I know you have an eglot-x.el package and I haven't had time to look at it. If you propose to expand the API of eglot.el with well-grounded use cases, I'm happy to take it. Also, once Eglot is in core, I won't be only person deciding. > More importantly, there are multiple language server implementations for > some languages (python, c) with different quirks or non-standard > extensions to the LSP protocol. How do you imagine a major-mode would > support these? They can adds methods to the generic function eglot-handle-request (and a handful others), set values of Eglot in their major-mode initialization code, bind keys to `eglot-*` interactive commands, make compound commands from those commands, etc. While they _can_, but that doesn't mean they _must_ or even _should_. In fact, LSP's whole idea, which is surprisingly forgotten so often, is that server and editor need to know very little about each other to be able to cooperate. By and large this idea works very very well. Eglot works with tens of servers and hasn't got a line of server specific code, except for eglot-server-programs invocations. There are exceptions, and not everyone has the same luck, but I've been using C++ clangd and C# omnisharp quite a lot lately and I have 0 lines of server specific config. > Authors of a major-mode even rejected to configure eglot-server-programs > in their mode saying it didn't belong to there. (Unfortunately, I > cannot find the github discussion for this.) I can't either, but I do remember it. One (1) author of a javascript-ish major mode rejected this, and I'm not sure this person was seeing the complete picture. Anyway, I can't foresee the future, but I don't see many major mode authors objecting to setting font-lock-* or imenu-* or many other things in their major modes. Major modes usually use transversal facilities in Emacs, and I wish for Eglot to gradually become one such facility. If you don't work like this you'll have "ghost" major-modes like `eglot-java.el`, `eglot-python.el`, with their own maintainers, their own philosophies, and eventually you're back to the beginning duplicating and rewriting all the code that LSP wants you to avoid doing. But it's true: I have seen one author here offer resistance to setting a single flymake- variable in the major mode, even though Flymake was in the core. I think it boils down to the fact that Flymake wasn't even known or popular with this person or, admittedly, even spectacularly useful out-of-the-box, at least not when compared to what it does when Flymake/Eglot/LSP combo. Nonetheless, I'd say eglot-server-programs and the current status quo isn't going anywhere for now.=20=20 So there isn't any problem/drama here. I definitely don't want to be breaking things in eglot.el. I was just stating the general direction. Jo=C3=A3o