CodeEditTextView
The Editor Text View for CodeEdit
This is currently only implemented in the
feature/new-editor
branch!
Documentation
This package is fully documented. Check out the documentation here!
Usage
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
)
}
}
Currently Supported Languages
- CSS
- Go
- HTML
- Java
- JSON
- Python
- Ruby
- Swift
- YAML
Dependencies
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 |