From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Fri, 28 Oct 2022 13:37:41 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5594"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?windows-1252?Q?Jo=E3o?= Paulo Labegalini de Carvalho Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 28 19:39:15 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 1ooTK7-0001Ds-8A for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Oct 2022 19:39:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooTIl-00080D-64; Fri, 28 Oct 2022 13:37:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooTIi-0007zM-Vm for emacs-devel@gnu.org; Fri, 28 Oct 2022 13:37:49 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooTIg-0004Ny-Kh for emacs-devel@gnu.org; Fri, 28 Oct 2022 13:37:48 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 69E49440EBA; Fri, 28 Oct 2022 13:37:44 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DDF39440BF0; Fri, 28 Oct 2022 13:37:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666978662; bh=siHXOfQpSqtlEGGtzVwtH+UfECscRTgyLul8VIQZxAQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=h2tHM0TiqHP5yDa5DT1Mrwzpoc9sly0PmGADDxGSqW3LWe9vK8VwuzfUOzbJXEZ96 Rtg9pgeXnoFq3ots3CCrVLJL1B1xU2qiCtGFZemjtxIJjNc8ktW2K9NSgxVCd5fe5g sr1qnyVTccR3uI2H0sOUBP1MkIq6QcUS9aVAAERnDwIn3Mma4NxGOiM8mhWG9YL/oJ Ez9IPg74or0oG/iyOpXewgwXCRJ/D2gPu3cXaZCGX04O/olIEe8/dKvx+IzHkg2mb1 +CAIKawH4ZB8ERa6/cY9FwAhEi/cAVYDvOiteFkXjFXgPjWLchK9XX4HpkD+4W39O6 b48xJgYatqxCw== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B6FE2120851; Fri, 28 Oct 2022 13:37:42 -0400 (EDT) In-Reply-To: (=?windows-1252?Q?=22Jo=E3o?= Paulo Labegalini de Carvalho"'s message of "Fri, 28 Oct 2022 10:34:56 -0600") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298686 Archived-At: > For instance, if we are creating features such as "function names", "nested > functions", and "punctuation" does it still make sense to have something > like `font-lock-maximum-decoration'? Because, it is not clear to me how we > can say that fontifying "multiline docstrings" is a *higher* decoration > than fontifying "function names". The point of the design is that, while the details are murky, we can make a "best effort" choice to map feature names to levels in `treesit-font-lock-feature-list`. This way, users can set a vague global "level" preference as a good baseline, which they can more finely tune according to their own preference by controlling individual features for specific modes. Stefan