From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 04 Jun 2021 13:39:52 +0300 Message-ID: <83wnr9vrpj.fsf@gnu.org> References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22707"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ubolonton@gmail.com, dancol@dancol.org, theo@thornhill.no, emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 12:42:18 2021 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 1lp7HO-0005i4-2T for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 12:42:18 +0200 Original-Received: from localhost ([::1]:40838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp7HN-0004lw-3t for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 06:42:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp7FD-0007py-Gu for emacs-devel@gnu.org; Fri, 04 Jun 2021 06:40:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47062) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp7FB-0007sr-Jf; Fri, 04 Jun 2021 06:40:01 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1522 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp7FB-0002ts-65; Fri, 04 Jun 2021 06:40:01 -0400 In-Reply-To: <87h7ieyma7.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Fri, 04 Jun 2021 11:08:48 +0100) 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:270372 Archived-At: > From: João Távora > Cc: Eli Zaretskii , Daniel Colascione , > emacs-devel@gnu.org, ubolonton@gmail.com > Date: Fri, 04 Jun 2021 11:08:48 +0100 > > - However, LSP support for fontification seems like it's potentially > _less_ efficient than integrating something like tree-sitter as a C > module in Emacs. That's because the contents of the buffer and > fontification results are continually transmitted back and forth via > pipes and JSON format. The communication of buffer contents to these agents/servers is indeed one aspect of the existing packages (those I had time to look at) that I personally am unhappy about. Sending the whole buffer or its large chunks down the wire as buffer-substring (which requires encoding to be correct) is non-scalable, especially if it also requires conversion to JSON. A core feature cannot work that way, IMO. Unfortunately, every discussion about the alternatives, at least those in which I participated, ended with nothing, although I think a much better solution is possible and even not too hard.