Git Product home page Git Product logo

codeedittextview's Introduction

CodeEditTextView

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.

social-cover-textview

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

⚠️ 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!

Documentation

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

    var body: some View { 
        CodeEditTextView(
            $text,
            language: .swift,
            theme: $theme,
            font: $font,
            tabWidth: $tabWidth,
            lineHeight: $lineHeight,
            editorOverscroll: $editorOverscroll
        )
    }
}

Currently Supported Languages

See this issue CodeEditApp/CodeEditLanguages#10 on CodeEditLanguages for more information on supported languages.

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

License

Licensed under the MIT license.

Related Repositories

        CodeEdit        

     CodeEditKit     

CodeEditLanguages

    CodeEdit CLI    

codeedittextview's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.