{"id":13815762,"url":"https://github.com/simonbs/Runestone","last_synced_at":"2025-05-15T09:33:46.821Z","repository":{"id":37031267,"uuid":"448941447","full_name":"simonbs/Runestone","owner":"simonbs","description":"📝 Performant plain text editor for iOS with syntax highlighting, line numbers, invisible characters and much more.","archived":false,"fork":false,"pushed_at":"2024-10-10T10:27:29.000Z","size":59567,"stargazers_count":2698,"open_issues_count":20,"forks_count":153,"subscribers_count":22,"default_branch":"main","last_synced_at":"2024-11-11T12:43:38.309Z","etag":null,"topics":["ios","swift","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonbs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"simonbs"}},"created_at":"2022-01-17T15:09:37.000Z","updated_at":"2024-11-10T08:03:59.000Z","dependencies_parsed_at":"2022-07-14T04:10:37.509Z","dependency_job_id":"da361a2d-0a2d-4676-b9af-b6b586904eb7","html_url":"https://github.com/simonbs/Runestone","commit_stats":{"total_commits":1054,"total_committers":14,"mean_commits":75.28571428571429,"dds":"0.017077798861480087","last_synced_commit":"8e424f174374d82422a69479ee84d4a2e970e7e8"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FRunestone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FRunestone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FRunestone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FRunestone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonbs","download_url":"https://codeload.github.com/simonbs/Runestone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225342838,"owners_count":17459485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","swift","tree-sitter"],"created_at":"2024-08-04T04:03:59.840Z","updated_at":"2025-05-15T09:33:46.815Z","avatar_url":"https://github.com/simonbs.png","language":"Swift","funding_links":["https://github.com/sponsors/simonbs"],"categories":["Swift","HarmonyOS","swift"],"sub_categories":["Windows Manager"],"readme":"![](https://github.com/simonbs/Runestone/raw/main/Sources/Runestone/Documentation.docc/Resources/hero.png)\n\n### 👋 Welcome to Runestone - a performant plain text editor for iOS with code editing features\n\nRunestone uses GitHub's [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) to parse code to a syntax tree which is used for features that require an understanding of the code in the editor, for example syntax highlighting.\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fsimonbs%2FRunestone%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/simonbs/Runestone)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fsimonbs%2FRunestone%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/simonbs/Runestone)\n[![Build and Test](https://github.com/simonbs/Runestone/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/simonbs/Runestone/actions/workflows/build_and_test.yml)\n[![Build Documentation](https://github.com/simonbs/Runestone/actions/workflows/build_documentation.yml/badge.svg)](https://github.com/simonbs/Runestone/actions/workflows/build_documentation.yml)\n[![Build Example Project](https://github.com/simonbs/Runestone/actions/workflows/build_example_project.yml/badge.svg)](https://github.com/simonbs/Runestone/actions/workflows/build_example_project.yml)\n[![CodeQL](https://github.com/simonbs/Runestone/actions/workflows/codeql.yml/badge.svg)](https://github.com/simonbs/Runestone/actions/workflows/codeql.yml)\n[![SwiftLint](https://github.com/simonbs/Runestone/actions/workflows/swiftlint.yml/badge.svg)](https://github.com/simonbs/Runestone/actions/workflows/swiftlint.yml)\n[![Twitter](https://img.shields.io/badge/Twitter-@simonbs-blue.svg?style=flat)](https://twitter.com/simonbs)\n[![Mastodon](https://img.shields.io/badge/Mastodon-@simonbs-blue.svg?style=flat)](https://mastodon.social/@simonbs)\n\n## ✨ Features\n\n- Syntax highlighting.\n- Line numbers.\n- Highlight the selected line.\n- Show invisible characters (tabs, spaces and line breaks).\n- Insertion of character pairs, e.g. inserting the trailing quotation mark when inserting the leading.\n- Customization of colors and fonts.\n- Toggle line wrapping on and off.\n- Adjust height of lines.\n- Add a page guide.\n- Add vertical and horizontal overscroll.\n- Highlight ranges in the text view.\n- Search the text using regular expressions.\n- Automatically detects if a file is using spaces or tabs for indentation.\n- Specify line endings (CR, LF, CRLF) to use when inserting a line break.\n- Automatically detect line endings in a text.\n\n## 🚀 Getting Started\n\nPlease refer to the [Getting Started](https://docs.runestone.app/documentation/runestone/gettingstarted) article in the documentation and the [Meet Runestone](https://docs.runestone.app/tutorials/meet-runestone) series of tutorials.\n\n## 📖 Documentation\n\nThe documentation of all public types is available at [docs.runestone.app](https://docs.runestone.app). The documentation is generated from the Swift code using Apple's [DocC documentation compiler](https://developer.apple.com/documentation/docc).\n\n## 🏎 Performance\n\nRunestone was built to be fast. Its good performance is by far mostly thanks to Tree-sitter's incremental parsing and [AvalonEdit's approach for managing lines in a document](https://github.com/icsharpcode/AvalonEdit/blob/master/ICSharpCode.AvalonEdit/Document/DocumentLineTree.cs).\n\nWhen judging the performance of Runestone, it is key to build your app in the release configuration. The optimizations applied by the compiler when using the release configuration becomes very apparent when opening large documents.\n\n## 🖥 Catalyst\n\nThe project should mostly work with Catalyst on the Mac, however, it isn't fully tested and the implementation isn't considered done. The focus is currently on the iPhone and iPad.\n\n## 📱 Projects\n\nThe Runestone framework is used by an app of the same name. The Runestone app is a plain text editor for iPhone and iPad that uses all the features of this framework.\n\n\u003ca href=\"https://apps.apple.com/us/app/runestone-editor/id1548193893\" target=\"_blank\"\u003e\u003cimg width=\"150\" alt=\"Runestone app icon\" src=\"Assets/runestone-editor-app-icon.png\"/\u003e\u003c/a\u003e\n\n\u003ca href=\"https://apps.apple.com/us/app/runestone-editor/id1548193893\" target=\"_blank\"\u003e\u003cimg width=\"150\" alt=\"Download on the App Store\" src=\"https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg\"/\u003e\u003c/a\u003e\n\n## 👨‍💻 Contributing\n\nPull requests with bugfixes and new features are much appreciated. I'll be happy to review them and merge them once they're ready, as long as they contain change that fit within the vision of Runestone and provide generally useful functionality.\n\nClone the repository to get started working on the project. Note that Runestone depends on Tree-sitter through a submodule. This submodule must be cloned as well before Runestone can be built. Pass the `--recursive` option when cloning the repository to clone all submodules.\n\n```bash\ngit clone --recursive git@github.com:simonbs/Runestone.git\n```\n\n## ❤️ Acknowledgments\n\n- [Tree-sitter](https://tree-sitter.github.io/tree-sitter) is used to parse code incrementally.\n- Line management is translated to Swift from [AvalonEdit](https://github.com/icsharpcode/AvalonEdit).\n- [swift-tree-sitter](https://github.com/viktorstrate/swift-tree-sitter) and [SwiftTreeSitter](https://github.com/ChimeHQ/SwiftTreeSitter) which have served as inspiration for the Tree-sitter bindings.\n- Detection of indent strategy inspired by [auto-detect-indentation](https://github.com/jtokoph/auto-detect-indentation).\n- And last (but not least!), thanks a ton to [Alexander Blach](https://twitter.com/Lextar) (developer of [Textastic](https://www.textasticapp.com)), [Till Konitzer](https://twitter.com/knutknatter) (developer of [Essayist](https://www.essayist.app)), [Greg Pierce](https://twitter.com/agiletortoise) (developer of [Drafts](https://getdrafts.com)) and [Max Brunsfeld](https://twitter.com/maxbrunsfeld) (developer of [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)) for pointing me in the right direction when I got stuck.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonbs%2FRunestone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonbs%2FRunestone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonbs%2FRunestone/lists"}