Textual 0.38.0 adds a syntax aware TextArea
This is the second big feature release this month after last week's command palette.
This is the second big feature release this month after last week's command palette.
TextArea
is the latest widget to be added to Textual's growing collection.
It provides a multi-line space to edit text, and features optional syntax highlighting for a selection of languages.
Adding a TextArea
to your Textual app is as simple as adding this to your compose
method:
Enabling syntax highlighting for a language is as simple as:
Working on the TextArea
widget for Textual taught me a lot about Python and my general
approach to software engineering. It gave me an appreciation for the subtle functionality behind
the editors we use on a daily basis — features we may not even notice, despite
some engineer spending hours perfecting it to provide a small boost to our development experience.
This post is a tour of some of these learnings.
Textual version 0.37.0 has landed! The highlight of this release is the new command palette.
If you know us, you will know that we are the team behind Rich and Textual — two popular Python libraries that work magic in the terminal.
Today we are adding one project more to that lineup: textual-web.
Broadly speaking, there are two types of contributions you can make to an Open Source project.
The Rich library has a few functions that are admittedly a little out of scope for a terminal color library. One such function is inspect
which is so useful you may want to pip install rich
just for this feature.
We have a new release of Textual to talk about, but before that I'd like to cover a little Textual news.
It's been a slow week or two at Textualize, with Textual devs taking well-earned annual leave, but we still managed to get a new version out.
Tech moves pretty fast. If you don’t stop and look around once in a while, you could miss it. And yet some technology feels like it has been around forever.
Terminals are one of those forever-technologies.
It's been 12 days since the last Textual release, which is longer than our usual release cycle of a week.
We've been a little distracted with our "dogfood" projects: Frogmouth and Trogon. Both of which hit 1000 Github stars in 24 hours. We will be maintaining / updating those, but it is business as usual for this Textual release (and it's a big one). We have such sights to show you.