From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Fri, 28 Oct 2022 10:45:05 -0700 Message-ID: <48F9C464-0F5F-4BF9-A27F-92F4F34FF0A8@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6582"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 28 19:46:52 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 1ooTRT-0001V1-Rh for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Oct 2022 19:46:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooTQF-0003dm-BV; Fri, 28 Oct 2022 13:45:35 -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 1ooTPt-0003QF-U9 for emacs-devel@gnu.org; Fri, 28 Oct 2022 13:45:21 -0400 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooTPo-0005p1-LV for emacs-devel@gnu.org; Fri, 28 Oct 2022 13:45:10 -0400 Original-Received: by mail-pg1-x536.google.com with SMTP id b5so5442870pgb.6 for ; Fri, 28 Oct 2022 10:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HLOzaddOaW+9eMuU9mxPVHwjaBSdfjiqVqwF5vewyN0=; b=kUPBjVTgYuerepbHDBZKq61CkZEjNzdacaQQ1XI2XUreoz1KDUAYzUeAwWK4UHtldl ss6MZiEKdmDzm+Sz2JE4ZK6s3Fj9AABfAx0dN3/M/XXuYZHr9qtgOL5+mNEW9KWTlDOM GOXCAfK0qO8TcDQJ4fChwWhj6KzG6LhErdeDO6lx76wOeb4YKOCKosOGx13SMB3sRE9G 70O4VFsv3PBwzGvF4niKjHKKxd9Dfr+afoRjqsmbgtR1nhHNId8PnRKOr/UqF/ZovNG1 zATHskhAZnOWTetzYiElonCfMxRYPA+6UPdnyDaRbH6sDq/QS7K8D7H2C4KlNt5csza7 wnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HLOzaddOaW+9eMuU9mxPVHwjaBSdfjiqVqwF5vewyN0=; b=l43qIogah/7NWtOFBILjTn99W8fV0mVUd7XejEyHz96JrUvxHFq31x9EsdMEZ/hbU0 eMsVKZS5KqUKBNTEsesNsRLZdfaGVLQ62kk2I0OGMFJARL+P3/N1H2LbRSkMYgako8S8 N6Vc8ZVQebjsOz4+QHE48/s6v7+yJkUm+JftW3mc57KvCH7KD3lp79IIFILL1tYvz7eh kY22obw2MM+82hkaIH/ndzfo40BW+kzhblxHvKh0yhw8zTknbE0P8T7RXnlZGBXdkeUT SpMyxI0XRPHivr+OlvNf1q1J/bncamFJ0xR+59rMAZzRrvO/Y86Gu8r3lYsuzsTgX7A6 fbcA== X-Gm-Message-State: ACrzQf3ERgGhF9v4XDhqgWPefCMi0c+xWqvwZcQqdtRKgawwiEkdan1r yyy/QBPsnyByVcalhft/SiQ= X-Google-Smtp-Source: AMsMyM76zjnoasZzVsZDagnz+8JPlCh1/lop2iC42cjwOaeBEQ6eSI/5iqjFGXpkpPBQodFzJZSs/A== X-Received: by 2002:a63:4753:0:b0:462:b3f0:a984 with SMTP id w19-20020a634753000000b00462b3f0a984mr531946pgk.501.1666979106787; Fri, 28 Oct 2022 10:45:06 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id f12-20020a170902ce8c00b0017ec1b1bf9fsm3388678plg.217.2022.10.28.10.45.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2022 10:45:06 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=casouri@gmail.com; helo=mail-pg1-x536.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 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:298688 Archived-At: > On Oct 28, 2022, at 10:37 AM, Stefan Monnier = wrote: >=20 >> 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". >=20 > 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`. >=20 > 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. I should probably add some convenient functions user can use to = add/remove feature from that list, since its not a plain list, but = rather a list of list. Yuan=