[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Standardizing tree-sitter fontification features
From: |
Stephen Leake |
Subject: |
Re: Standardizing tree-sitter fontification features |
Date: |
Sat, 26 Nov 2022 06:03:50 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Yuan Fu <casouri@gmail.com> writes:
> For tree-sitter-based major modes, fontification rules are categorized
> into “features”, which can be individually turned on/off. I think it
> would be good to have a standardized list of common features and their
> precise meaning defined. We’ve been working on these fontification
> rules for some time and arrived at a reasonable baseline, and now it’s
> a good time to discuss and bless it, I think.
>
> Right now we have:
>
> Basic tokens:
>
> delimiter ,.;
> operator = != ||
> bracket []{}()
>
> constant true, false, null
> number
> keyword
> comment
> string
> string-interpolation f"text {variable}"
> escape-sequence "\n\t\\"
> function every function identifier
> variable every variable identifier
> type every type identifier
> property a.b <--- highlight b
namespace would be useful; in some languages, like C++, the syntax
namespace::namespace::object.member makes it clear which identifiers are
namespaces. In others, like Ada the syntax is
namespace.namespace.object.member, so it's not clear.
--
-- Stephe
- Re: Standardizing tree-sitter fontification features, (continued)
Re: Standardizing tree-sitter fontification features, Eli Zaretskii, 2022/11/25
Re: Standardizing tree-sitter fontification features, Stefan Monnier, 2022/11/24
Re: Standardizing tree-sitter fontification features,
Stephen Leake <=