From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: PL support Date: Sat, 9 May 2020 18:08:52 +0100 Message-ID: References: <9mmFgzvrBwjt_n_VJyaJdXINraNi5HsGpwq-0MLeKiJA7kG2BQA4uywrzjyz7lpRS0OZDpjEi8lspOKYUA7P_QsODsDew_8nbH960G55fmY=@protonmail.com> <87d07xamrg.fsf@ericabrahamsen.net> <878silajdl.fsf@ericabrahamsen.net> <87tv18pyh4.fsf@russet.org.uk> <83zhaih0oz.fsf@gnu.org> <83pnbegsvm.fsf@gnu.org> <83imh5hby1.fsf@gnu.org> <2e4e8ce9-d857-f3e3-31cf-a40dee67bd25@yandex.ru> <83y2q1dsvh.fsf@gnu.org> <2468efa6-7dbd-8634-44cc-586bb6985f49@yandex.ru> <83pnbddrfd.fsf@gnu.org> <83k11ldpxs.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="ciao.gmane.io:159.69.161.202"; logging-data="107245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , Stefan Monnier , Dmitry Gutov To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 19:09:46 2020 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 1jXSyv-000Rmo-8a for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 19:09:45 +0200 Original-Received: from localhost ([::1]:50506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXSyt-0006At-QY for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 13:09:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXSyJ-0005Yk-Pp for emacs-devel@gnu.org; Sat, 09 May 2020 13:09:07 -0400 Original-Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]:41330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXSyH-0003Vc-H5; Sat, 09 May 2020 13:09:07 -0400 Original-Received: by mail-io1-xd2c.google.com with SMTP id w11so5044572iov.8; Sat, 09 May 2020 10:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/T857Fk8QF6skpL7Jlv4pCcS5ywZHDu1sLtSUT56iWk=; b=dVxIf/l2XVUW4GzvxvZlcE/Vnc+vX5DpvQdI4MahHV0Db3NIL3ps+B3B6H2KcVNwGp yEYzh8jW+M1G22Zketrp76uOM+Fme4EO1FSnFNcV1ALnBImsrm1sNM9BiKuQKwXRTDJq lYMoB/bqnfP860Ff1dj8q9cZ/Y6lBlj0/baWpODPCOMn6NnWkpJvpjtJ9nrQAoc7CH67 jaqHsc3Zycv2wbTd9iLWUGTND5iUuh/Yv57MCIigD67VKvycxkZMdE7fAmAua0YIFBth d26DwgKb/y9lLuuPrePX09t2krNeDw6bthggqJR/a/h5I1iVNwx7GTJib2Nz1ExF8wat sooQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/T857Fk8QF6skpL7Jlv4pCcS5ywZHDu1sLtSUT56iWk=; b=SxFExY6qIbEJPjwWOhmoqXCCOQudj9GeMysF37SXe5AGE00v9UMpjjaAe6jNQ8qLYc C8oPErYTsxrWn47KdgcznVVihd9VOtopL6vEYrHKTiXBy1S3oZVVHmhBP1/oySKT+we0 oHnxXAHQHKEsAm7+6RiiztnIAg4PrH0/yHYgVX/E1HSLQzBj331kuSlLoe/D/AE1Jjgp a1A+R989C2ccqcMtEQcXwXd8xqPejKdnB4WC432Z8zy9aUxGHGsfj8eFgTBA/zqd8nsb wrNGAnamhBj73sKYfmKiUoTdw5ELyC6D2Q1YcGwh6eYpL2jq96TUBhMxT5Q7ad47Sgs/ A+yw== X-Gm-Message-State: AGi0PuYgj+n+7/qz/Zh75oWbYDxLSy2KpgHIUFfIHicZnayWp473v5cq Q4xXQF/rgpM/VTXgrrFz0MQPUuW4VwDQMHVqje373LSsOtY= X-Google-Smtp-Source: APiQypJsNPN5kOsEEtPfJDmP2xs/aNV8/N8UUMek5va/UqxJa+nsX0mfR6q5OCwxTnpmyWHxnyTz+a7R7N2kT7Z5ZYQ= X-Received: by 2002:a5d:8257:: with SMTP id n23mr8109104ioo.165.1589044143696; Sat, 09 May 2020 10:09:03 -0700 (PDT) In-Reply-To: <83k11ldpxs.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::d2c; envelope-from=joaotavora@gmail.com; helo=mail-io1-xd2c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:249509 Archived-At: On Sat, May 9, 2020 at 5:38 PM Eli Zaretskii wrote: > > You said you'd like to see "more of Eglot's LSP support" in the core, t= wo > > years ago: > > > > https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00419.html > > I very much doubt Dmitry was replying to that 2-year old message. He > was replying to what I said today. I didn't say he was. I just pasted the message to give you context about what my perception of the plan was. > > set of Elisp macros that allow for compile-time and run-time checking > > of LSP messages, among other LSP-specific but interface-agnostic > > details. > > > > Shall I start working on that? > > What I'd like to see is a way to switch language-specific features in > CC Mode to LSP or some other similar facility. I was only speaking of the LSP facility. If you have reasons to think that tree-sitter completely obviates the need for LSP in Emacs (I don't), then you should let me know to prevent me from doing unnecessary work. > Assuming that doing so > will make CC Mode faster and more accurate, that is. Be aware that that depends on an external server program, and I we don't control that now and likely for some time. Also be aware syntax-highlighting support is still being finished in the protocol (but so close to it that LSP's maintainer said days ago they are "in endgame"). Now, I have to address what I believe is a misperception of how LSP can work in Emacs. eglot.el delivers a minor mode that works independently of the major mode. In contrast to lsp-mode.el, there is no language-specific code in eglot.el (apart from 2 minor exceptions which we'll soon dispose of). Anyway the only thing that eglot/LSP can do for cc-mode.el specifically is ask it to define the file-name of a preferred language server program and enable eglot-managed-mode by default. Nothing more. Then we have to work on eglot.el (or wherever the choice befalls) to start supporting the syntax highlighting features whereby font-locking information are gathered from the server. Since exchanging information about source-file changes is largely a solved problem, as soon as servers start declaring support the new syntax highlighting extensions, it's is a question of applying the text properties in an efficient manner. Anyway, it is is because of this loose coupling that Dmitry says that Eglot could live "forever" outside of the core. And it's mostly true. But I do believe that if it were in the core (like if company.el or an equivalent library was in the core) that would help even more CC Mode users (or Foo Mode users) discover LSP's advantages, especially if Emacs also started distributing an LSP server program for C or FOO. Jo=C3=A3o