Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codeeditapp/codeeditsourceeditor
A code editor view written in Swift powered by tree-sitter.
https://github.com/codeeditapp/codeeditsourceeditor
swift tree-sitter
Last synced: 30 days ago
JSON representation
A code editor view written in Swift powered by tree-sitter.
- Host: GitHub
- URL: https://github.com/codeeditapp/codeeditsourceeditor
- Owner: CodeEditApp
- License: mit
- Created: 2022-05-27T12:35:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-08T12:43:47.000Z (about 1 month ago)
- Last Synced: 2024-10-09T23:23:50.171Z (30 days ago)
- Topics: swift, tree-sitter
- Language: Swift
- Homepage: https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
- Size: 2.13 MB
- Stars: 515
- Watchers: 17
- Forks: 80
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
CodeEditSourceEditor
An Xcode-inspired code editor view written in Swift powered by tree-sitter for [CodeEdit](https://github.com/CodeEditApp/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](https://img.shields.io/github/v/release/CodeEditApp/CodeEditSourceEditor?color=orange&label=latest%20release&sort=semver&style=flat-square)
![Github Tests](https://img.shields.io/github/actions/workflow/status/CodeEditApp/CodeEditSourceEditor/tests.yml?branch=main&label=tests&style=flat-square)
![Documentation](https://img.shields.io/github/actions/workflow/status/CodeEditApp/CodeEditSourceEditor/build-documentation.yml?branch=main&label=docs&style=flat-square)
![GitHub Repo stars](https://img.shields.io/github/stars/CodeEditApp/CodeEditSourceEditor?style=flat-square)
![GitHub forks](https://img.shields.io/github/forks/CodeEditApp/CodeEditSourceEditor?style=flat-square)
[![Discord Badge](https://img.shields.io/discord/951544472238444645?color=5865F2&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/vChUXVf9Em)> [!IMPORTANT]
> **CodeEditSourceEditor 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](https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor/).
## Usage
```swift
import CodeEditSourceEditorstruct 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.3var body: some View {
CodeEditSourceEditor(
$text,
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.
## Dependencies
Special thanks to [Matt Massicotte](https://twitter.com/mattie) for the great work he's done!
| Package | Source | Author |
| :- | :- | :- |
| `SwiftTreeSitter` | [GitHub](https://github.com/ChimeHQ/SwiftTreeSitter) | [Matt Massicotte](https://twitter.com/mattie) |## License
Licensed under the [MIT license](https://github.com/CodeEditApp/CodeEdit/blob/main/LICENSE.md).
## Related Repositories
CodeEdit
CodeEditTextView
CodeEditLanguages
CodeEditCLI
CodeEditKit