Xcode on OS X has really nice inline automatic completions / suggestions while editing text with embedded documentation and such. How would I even start to achieve something like this using SwiftUI's TextEditor?

My question here isn't about building up the data to offer for suggestions. It's about how to have TextEditor interact with my code so I can provide an inline overlay populated with suggestions?
Possibly TextEditor just doesn't do this, which would be a perfectly good answer if that's the case! If it is possible, a great answer might give a brief example of how to hook a TextEditor with in inline overlay of some kind and some pointers to relevant bits of the API to achieve this.
If this isn't possible in SwiftUI, then how to do it with UIKit would also be very interesting to know.
Thanks.
you could try this (very rough) approach of using
.onChange(...)for interaction, and a.popover(...)(or your own popup view) to display your suggestions.The example code shows a popup when you type
xin theTextEditor, then click on an item to select it.