Swiftpack.co - CodeEditApp/CodeEditTextView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by CodeEditApp.
CodeEditApp/CodeEditTextView 0.6.7
A code editor view written in Swift powered by tree-sitter.
⭐️ 400
🕓 8 weeks ago
.package(url: "https://github.com/CodeEditApp/CodeEditTextView.git", from: "0.6.7")


An Xcode-inspired code editor view written in Swift powered by tree-sitter for CodeEdit. Features include syntax highlighting (based on the provided theme), code completion, find and replace, text diff, validation, current line highlighting, minimap, inline messages (warnings and errors), bracket matching, and more.


GitHub release Github Tests Documentation GitHub Repo stars GitHub forks Discord Badge

:warning: CodeEditTextView is currently in development and it is not ready for production use.
Please check back later for updates on this project. Contributors are welcome as we build out the features mentioned above!


This package is fully documented 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
    @State var editorOverscroll = 0.3

    var body: some View { 
            language: .swift,
            theme: $theme,
            font: $font,
            tabWidth: $tabWidth,
            lineHeight: $lineHeight,
            editorOverscroll: $editorOverscroll

Currently Supported Languages

See this issue https://github.com/CodeEditApp/CodeEditLanguages/issues/10 on CodeEditLanguages for more information 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


Licensed under the MIT license.

Related Repositories




    CodeEdit CLI    


Stars: 400
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

8 weeks ago

What's Changed

Full Changelog: https://github.com/CodeEditApp/CodeEditTextView/compare/0.6.6...0.6.7

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics