From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 05 Jun 2021 20:56:44 +0200 Message-ID: References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> <15be7dd8-e901-e317-5111-e1a34f6f0416@gmail.com> <83k0n9l9pv.fsf@gnu.org> <83eedhl83r.fsf@gnu.org> <838s3olsok.fsf@gnu.org> <87lf7oy7vn.fsf@gmail.com> <20210605095904.vnyrph5n4lqooeyh@Ergus> <83o8ckk0s4.fsf@gnu.org> <83h7icjy2y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23229"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cc: Eli Zaretskii , Daniel Colascione , joaotavora@gmail.com, spacibba@aol.com, theo@thornhill.no, ubolonton@gmail.com, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 05 20:57:40 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 1lpbUJ-0005lQ-1u for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 20:57:39 +0200 Original-Received: from localhost ([::1]:56906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpbUH-00058J-UL for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 14:57:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpbTh-00047d-0a for emacs-devel@gnu.org; Sat, 05 Jun 2021 14:57:01 -0400 Original-Received: from sonic315-13.consmr.mail.bf2.yahoo.com ([74.6.134.123]:43523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpbTc-0004lO-F9 for emacs-devel@gnu.org; Sat, 05 Jun 2021 14:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1622919413; bh=wnjb+dZIPY9eRAAItkwmrXa4gIjwRzjWv9TFfXnAEdw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Txkc92oLJ3hXLpryZPICJdJbNWt9aM6RG31yCc97PEzWf0vY/Unf+89UzfJz2Iu7WM30oH9P2D/Hzg7tp8zZESwIULeDZiq4Zu2IHToKrb2KQLnjd6qOXwRkGP2tTe8Al9WhDtJnKNvCJf1qsFCt4pBfRQKFTkzXwv/qz2X5tKmBVYPo0rFHVrZkaDG30O9uzObAvGusb5RAjSS1Y5h5iAbYWtaifC5SWgvYiisyd3+hCL0YKZFVqu7zNSxR0X26pREJQwBmNMqzwOQ2n+PAElvIy8ZNxWkksK8AiZlK+QQOYK2XNwb5I439PJ2O4I2jPhdiVXb9bdsc12jmL15Vww== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1622919413; bh=yufm4EXERUr+VfMSnPh1vg+PJZwdUK/PmuGMvHtTU4i=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Lwyr5LIS/94KyuakfP4uJcObGJEy/AXI78IZ5lDAmb4eF54RnEIhnOvUxKQcSTyjhPalDgXpLGAiVUYbcmhjcG9vJ/mkPVyIH+jTjW/TOT17MWQTOGhrJoP2AUfsEJMxSFNvid7fF3c3pqL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FFMD60uk1JC3o X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Sat, 5 Jun 2021 18:56:53 +0000 Original-Received: by kubenode518.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID d39552a97d506407b6054d3fb3fab956; Sat, 05 Jun 2021 18:56:46 +0000 (UTC) In-Reply-To: (Jim Porter's message of "Sat, 5 Jun 2021 10:59:26 -0700") X-Mailer: WebService/1.1.18368 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=74.6.134.123; envelope-from=mardani29@yahoo.es; helo=sonic315-13.consmr.mail.bf2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no 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:270446 Archived-At: Jim Porter writes: > Looking into this a bit more, I'm not actually 100% sure how much > VSCode (or other LSP-aware editors) use LSP for syntax highlighting > today. Semantic tokens are only available in the most recent > specification of LSP (3.16)[1], so many LSP clients/servers likely > wouldn't be using this yet. It might be helpful to see what they were > doing prior to this; there may be some relatively non-invasive changes > that could improve things. VSCode uses TextMate grammars[1] for syntax highlighting. If the language server supports it, it adds semantic highlighting on top of it. I think TextMate grammars have more or less the same problems our current syntax highlighting engine has: They are regexp-based, and difficult to write and maintain. Two editors that I think are already using Tree-sitter for syntax highlighting are Atom and Neovim. [1]: https://macromates.com/manual/en/language_grammars