A collection of tree-sitter languages for syntax highlighting.
This package includes a binary framework CodeLanguagesContainer.xcframework which bundles all tree-sitter languages in a single binary to greatly reduce SPM package resolution times.
The languages are then served as a CodeLanguage.
This package heavily depends on SwiftTreeSitter by Matt Massicotte.
The documentation including a guide on how to add support for new languages can be found here!
There are several language grammars available for tree-sitter. Many of them are already supported in CodeEditLanguages. In order to use syntax-highlighting with those grammars, they need to supply a highlights.scm file. Grammars for which this file does not exist yet, are marked with not available below. This file has to be added to the grammar's repo directly.
In order to add support for additional languages we have a complete guide on how to implement them in CodeEditLanguages available here.
If you want to add support for another language, please file an issue first, so everyone knows that this is in progress.
| Grammar | Implemented | Syntax Highlighting |
|---|---|---|
| Agda | not available | |
| Bash | ✅ | ✅ |
| C | ✅ | ✅ |
| C++ | ✅ | ✅ |
| C# | ✅ | ✅ |
| CSS | ✅ | ✅ |
| Dart | ✅ | ✅ |
| Dockerfile | ✅ | ✅ |
| Elixir | ✅ | ✅ |
| ERB, EJS | ||
| Go | ✅ | ✅ |
| Haskell | ✅ | ✅ |
| HTML | ✅ | ✅ |
| Java | ✅ | ✅ |
| JavaScript/JSX | ✅ | ✅ |
| JSDoc | ✅ | ✅ |
| JSON | ✅ | ✅ |
| Julia | not available | |
| Kotlin | ✅ | ✅ |
| Lua | ✅ | ✅ |
| Markdown | ✅ | ✅ |
| Objective C | ✅ | ✅ |
| OCaml | ✅ | ✅ |
| Plain Text | ✅ | not available |
| Perl | not available | |
| PHP | ✅ | ✅ |
| Python | ✅ | ✅ |
| Regex | ✅ | ✅ |
| Ruby | ✅ | ✅ |
| Rust | ✅ | ✅ |
| Scala | ✅ | ✅ |
| Sql | ✅ | ✅ |
| Swift | ✅ | ✅ |
| TOML | ||
| TypeScript/TSX | ✅ | ✅ |
| Verilog | not available | |
| YAML | ✅ | ✅ |
| Zig | ✅ | ✅ |
CodeEdit |
CodeEditTextView |
CodeEditKit |
CodeEdit CLI |
