The Editor Text View for CodeEdit
This is currently only implemented in the
feature/new-editor
branch!
This package is fully documented. Check out the documentation here!
import CodeEditTextView
struct ContentView: View {
@State var text = "let x = 1.0"
@State var theme = EditorTheme(...)
@State var font = NSFont.monospacedSystemFont(ofSize: 11, weight: .regular)
@State var tabWidth = 4
@State var lineHeight = 1.2
var body: some View {
CodeEditTextView(
$text,
language: .swift,
theme: $theme,
font: $font,
tabWidth: $tabWidth,
lineHeight: $lineHeight
)
}
}
See issue CodeEditApp/CodeEditTextView#15 for informations on supported languages
Special thanks to both Marcin Krzyzanowski & Matt Massicotte for the great work they've done!
Package | Source | Author |
---|---|---|
STTextView |
GitHub | Marcin Krzyzanowski |
SwiftTreeSitter |
GitHub | Matt Massicotte |