Chime 2.0 is getting closer to a public beta. It will have a bunch of new features, but the really big news is support for extensions! The extension system is built with ExtensionKit, a new API coming with macOS Ventura. Extensions can add language-level functionality, as well as in-app user interfaces, all built with Swift and SwiftUI.
This is big - 3rd parties will be able to add capabilities to Chime!
A few months ago, we added support for Ruby. That project was the big motivator for an internal extension system, especially because we’re planning to bring more languages to Chime. By chance, we were just really getting going with an official extension system when ExtensionKit was released during WWDC 2022.
Our base extension API can be used to provide all the language-level features that Chime supports today. It offers full integration with Chime’s project and document management model, sandboxing support, as well as a Language Server Protocol abstraction to make wrapping an LSP server straightforward.
One of the amazing capabilities of ExtensionKit is that is allows extensions to display a view within the hosting application. While Chime’s extension system was originally setup for languages, we just had to support this too because it’s cool. Chime 2.0 will support two different UI extension types.
The first is a fixed trailing-edge sidebar. This view can be active for projects and documents, independently. This is a fairly standard approach among IDEs. But, what isn’t standard is this view can be constructed using SwiftUI, and supports all of its features - even animation.
The second type of UI extension is also a trailing-edge sidebar. But its height and scroll position are kept in sync with the text contents of an open text document. A generalized view that can coordinate with the source code enables a lot of powerful features.
Our core extension API is set, and we’ve now got lots of experience building with ExtensionKit. But, we still do have work to do for document-synced views. In particular, we’ve been having a hard time coming up with a reasonable API for determining text element positions and measurements. Chime makes extensive use of text layout information for its own UI, but extensions present some challenges, not the least of which is the inherent asynchronous interface.
We thought it might make more sense to open up our extension system early, to get some feedback and ideas on how these APIs should work. ChimeKit is available now, and should have enough information to get you going today.
We’re also posting a very early beta of Chime 2.0 (download link available on this page). It still has a number of issues, and isn’t quite ready for a general beta release. But, it’s definitely enough to try our extension support.
Chime 2.0 is an absolutely enormous release. It features a CLI tool and fuzzy-matching quick open, but extensions are what we are most excited about.
Tue, Aug 09, 2022 - Matt Massicotte