Skip to content

refactor(cli): better colored printing#5594

Merged
WillLillis merged 2 commits into
tree-sitter:masterfrom
WillLillis:better_paint
May 17, 2026
Merged

refactor(cli): better colored printing#5594
WillLillis merged 2 commits into
tree-sitter:masterfrom
WillLillis:better_paint

Conversation

@WillLillis

Copy link
Copy Markdown
Member

I've been working on a couple new tree-sitter features and other side projects and have settled on this painting abstraction as a strict improvement over our current paint function. This new wrapper struct leads to generally clearer code (imo), and avoids needless temporary String allocations.

The first commit in this PR also corrects our handling of the NO_COLOR environment variable, matching the spec.

With these changes, CST rendering sees a 20-30% boost in throughput for large files.

@WillLillis WillLillis requested a review from amaanq May 16, 2026 03:00
@WillLillis WillLillis added the cli label May 16, 2026
WillLillis and others added 2 commits May 17, 2026 00:48
Co-authored-by: Amaan Qureshi <git@amaanq.com>
Co-authored-by: Amaan Qureshi <git@amaanq.com>
@WillLillis WillLillis merged commit 7104092 into tree-sitter:master May 17, 2026
35 of 37 checks passed
@WillLillis WillLillis deleted the better_paint branch May 17, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants