π #71 Update β A Major Leap Forward (Dev notes) #91
mkh-user
announced in
Announcements
Replies: 1 comment
-
|
Merged to 0.1-rc1, there is a lot of new features available in Text Forge now! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone π
For a long time, the structure of Modes in Text Forge had become a serious bottleneck for development. Every time we wanted to add a new feature β whether it was syntax highlighting, the Preview panel, or even Auto Format β we had to wrestle with legacy code and convoluted structures. This made Mode development both slow and fragile.
So we decided it was time for a major overhaul. The result is PR #71, where weβve rewritten the Mode API from the ground up β now reaching version 2.0. Itβs still under development, but weβve landed the final changes and I wanted to share this note before merging.
π§© What changed?
Previously, Modes were scattered classes, each implementing a piece of behavior or functionality. There was no unified structure, and adding new features like Preview or Outline to the Mode API was practically impossible. One major issue was the risk of incompatibility between each Modeβs functions and the standard instance.
Now, in the new version:
TextForgeMode, which ensures the editor behaves correctly even with incomplete Modes. It also provides a shared foundation that reduces code duplication and allows bulk updates across all Modes.You can explore the changes in the mode library branch here: Mode Library - Update TFM API 2.0.
Once this update is finalized, itβll be merged into the main branch. Iβve also published a note there about the new Text Forge Mode API, along with a list of new Modes and links to their repositories. Each Mode now lives in its own repo (Mode Kits too), which greatly improves the development workflow. Plus, unofficial Modes are now treated with the same respect as official ones β as they should be. You can check out the first unofficial Text Forge Mode here: Text Forge Python Mode
β¨ New capabilities unlocked
This isnβt just a refactor β itβs a whole new foundation for building advanced features. Some of the things already enabled:
π What weβve tested
Weβve tried to cover all Mode-related areas:
Regression testing is still ongoing, and there may be bugs we havenβt caught yet. So weβd love it if you could test things out and share your feedback.
The Mode Manager was left out of the previous refactor, so its code isnβt super clean. Still, the structural changes to Modes have inevitably affected this part too. Because of its complexity and lack of cleanup, bugs are more likely here β please report anything you find.
π― Why this matters
This rewrite is a turning point. Not just because the code is cleaner, but because now we can:
Itβs a big step toward a more extensible, reliable, and professional Text Forge.
π¬ Weβd love your feedback
If you have time, check out PR #71. You can clone it and see the changes directly (plus, the new Modes each have their own repo β you can explore 8 new Modes in the updated mode library, packed with improved features). Any thoughts, suggestions, or bug reports would be super helpful. Feel free to comment here or open an issue.
Huge thanks to everyone who helped along the way β whether through coding, reviewing, or testing. β€οΈ
β Mahan
Beta Was this translation helpful? Give feedback.
All reactions