Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
28171CB2298143C400523F1C /* TreeSitterObjC in Frameworks */ = {isa = PBXBuildFile; productRef = 28171CB1298143C400523F1C /* TreeSitterObjC */; };
282E5977298051980064B34A /* TreeSitterYAML in Frameworks */ = {isa = PBXBuildFile; productRef = 282E5976298051980064B34A /* TreeSitterYAML */; };
2846B262296BA1CF005F60B6 /* TreeSitterDockerfile in Frameworks */ = {isa = PBXBuildFile; productRef = 2846B261296BA1CF005F60B6 /* TreeSitterDockerfile */; };
2886C788298135540023E016 /* TreeSitterKotlin in Frameworks */ = {isa = PBXBuildFile; productRef = 2886C787298135540023E016 /* TreeSitterKotlin */; };
28B3F010290C207D000CD04D /* CodeLanguages_Container.h in Headers */ = {isa = PBXBuildFile; fileRef = 28B3F00F290C207D000CD04D /* CodeLanguages_Container.h */; settings = {ATTRIBUTES = (Public, ); }; };
28B3F02D290C35D9000CD04D /* TreeSitterC in Frameworks */ = {isa = PBXBuildFile; productRef = 28B3F02C290C35D9000CD04D /* TreeSitterC */; };
28B3F030290C35F9000CD04D /* TreeSitterCPP in Frameworks */ = {isa = PBXBuildFile; productRef = 28B3F02F290C35F9000CD04D /* TreeSitterCPP */; };
Expand Down Expand Up @@ -60,8 +62,10 @@
28B3F045290C366E000CD04D /* TreeSitterHTML in Frameworks */,
28B3F05A290C36E5000CD04D /* TreeSitterRust in Frameworks */,
28B3F054290C36C5000CD04D /* TreeSitterPython in Frameworks */,
28171CB2298143C400523F1C /* TreeSitterObjC in Frameworks */,
28B3F048290C367C000CD04D /* TreeSitterJava in Frameworks */,
282E5977298051980064B34A /* TreeSitterYAML in Frameworks */,
2886C788298135540023E016 /* TreeSitterKotlin in Frameworks */,
28B3F057290C36D5000CD04D /* TreeSitterRuby in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -160,6 +164,8 @@
28B9F7A9290DDAC900245748 /* TreeSitterBash */,
2846B261296BA1CF005F60B6 /* TreeSitterDockerfile */,
282E5976298051980064B34A /* TreeSitterYAML */,
2886C787298135540023E016 /* TreeSitterKotlin */,
28171CB1298143C400523F1C /* TreeSitterObjC */,
);
productName = "CodeLanguages-Container";
productReference = 28B3F00C290C207D000CD04D /* CodeLanguages_Container.framework */;
Expand Down Expand Up @@ -211,6 +217,8 @@
28B9F7A6290DDAB500245748 /* XCRemoteSwiftPackageReference "tree-sitter-bash" */,
2846B260296BA1CF005F60B6 /* XCRemoteSwiftPackageReference "tree-sitter-dockerfile" */,
282E5975298051980064B34A /* XCRemoteSwiftPackageReference "tree-sitter-yaml" */,
2886C786298135540023E016 /* XCRemoteSwiftPackageReference "tree-sitter-kotlin" */,
28171CB0298143C400523F1C /* XCRemoteSwiftPackageReference "tree-sitter-objc" */,
);
productRefGroup = 28B3F00D290C207D000CD04D /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -450,6 +458,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
28171CB0298143C400523F1C /* XCRemoteSwiftPackageReference "tree-sitter-objc" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/CodeEditApp/tree-sitter-objc";
requirement = {
branch = feature/spm;
kind = branch;
};
};
282E5975298051980064B34A /* XCRemoteSwiftPackageReference "tree-sitter-yaml" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/lukepistrol/tree-sitter-yaml.git";
Expand All @@ -466,6 +482,14 @@
kind = branch;
};
};
2886C786298135540023E016 /* XCRemoteSwiftPackageReference "tree-sitter-kotlin" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/lukepistrol/tree-sitter-kotlin";
requirement = {
branch = "feature/spm-queries";
kind = branch;
};
};
28B3F02B290C35D9000CD04D /* XCRemoteSwiftPackageReference "tree-sitter-c" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/tree-sitter/tree-sitter-c.git";
Expand Down Expand Up @@ -621,6 +645,11 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
28171CB1298143C400523F1C /* TreeSitterObjC */ = {
isa = XCSwiftPackageProductDependency;
package = 28171CB0298143C400523F1C /* XCRemoteSwiftPackageReference "tree-sitter-objc" */;
productName = TreeSitterObjC;
};
282E5976298051980064B34A /* TreeSitterYAML */ = {
isa = XCSwiftPackageProductDependency;
package = 282E5975298051980064B34A /* XCRemoteSwiftPackageReference "tree-sitter-yaml" */;
Expand All @@ -631,6 +660,11 @@
package = 2846B260296BA1CF005F60B6 /* XCRemoteSwiftPackageReference "tree-sitter-dockerfile" */;
productName = TreeSitterDockerfile;
};
2886C787298135540023E016 /* TreeSitterKotlin */ = {
isa = XCSwiftPackageProductDependency;
package = 2886C786298135540023E016 /* XCRemoteSwiftPackageReference "tree-sitter-kotlin" */;
productName = TreeSitterKotlin;
};
28B3F02C290C35D9000CD04D /* TreeSitterC */ = {
isa = XCSwiftPackageProductDependency;
package = 28B3F02B290C35D9000CD04D /* XCRemoteSwiftPackageReference "tree-sitter-c" */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ extern TSLanguage *tree_sitter_html();
extern TSLanguage *tree_sitter_java();
extern TSLanguage *tree_sitter_javascript();
extern TSLanguage *tree_sitter_json();
extern TSLanguage *tree_sitter_kotlin();
extern TSLanguage *tree_sitter_objc();
extern TSLanguage *tree_sitter_php();
extern TSLanguage *tree_sitter_python();
extern TSLanguage *tree_sitter_ruby();
Expand Down
Binary file modified CodeLanguagesContainer.xcframework.zip
Binary file not shown.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ In order to add support for additional languages we have a complete guide on how
| [JSDoc](https://github.com/tree-sitter/tree-sitter-jsdoc) | | |
| [JSON](https://github.com/mattmassicotte/tree-sitter-json) | ✅ | ✅ |
| [Julia](https://github.com/tree-sitter/tree-sitter-julia) | | _not available_ |
| [Kotlin](https://github.com/fwcd/tree-sitter-kotlin) | | _not available_ |
| [Kotlin](https://github.com/fwcd/tree-sitter-kotlin/tree/feature/spm-queries) | ✅ | ✅ |
| [Markdown](https://github.com/ikatyang/tree-sitter-markdown) | | _not available_ |
| [Objective C](https://github.com/CodeEditApp/tree-sitter-objc/tree/feature/spm) | ✅ | ✅ |
| [OCaml](https://github.com/tree-sitter/tree-sitter-ocaml) | | |
| Plain Text | ✅ | _not available_ |
| [Perl](https://github.com/ganezdragon/tree-sitter-perl) | | _not available_ |
Expand Down
16 changes: 16 additions & 0 deletions Sources/CodeEditLanguages/CodeLanguage+Definitions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public extension CodeLanguage {
.javascript,
.json,
.jsx,
.kotlin,
.objc,
.php,
.python,
.ruby,
Expand Down Expand Up @@ -142,6 +144,20 @@ public extension CodeLanguage {
highlights: ["highlights-jsx"]
)

/// A language structure for `Kotlin`
static let kotlin: CodeLanguage = .init(
id: .kotlin,
tsName: "kotlin",
extensions: ["kt", "kts"]
)

/// A language structure for `Objective C`
static let objc: CodeLanguage = .init(
id: .objc,
tsName: "objc",
extensions: ["m"]
)

/// A language structure for `PHP`
static let php: CodeLanguage = .init(
id: .php,
Expand Down
4 changes: 4 additions & 0 deletions Sources/CodeEditLanguages/CodeLanguage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public struct CodeLanguage {
return tree_sitter_json()
case .jsx:
return tree_sitter_javascript()
case .kotlin:
return tree_sitter_kotlin()
case .objc:
return tree_sitter_objc()
case .php:
return tree_sitter_php()
case .python:
Expand Down
4 changes: 4 additions & 0 deletions Sources/CodeEditLanguages/Documentation.docc/CodeLanguage.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ let language = CodeLanguage.detectLanguageFrom(url: fileURL)
- JavaScript
- JSON
- JSX
- Kotlin
- Objective C
- PHP
- Python
- Ruby
Expand Down Expand Up @@ -78,6 +80,8 @@ let language = CodeLanguage.detectLanguageFrom(url: fileURL)
- ``javascript``
- ``json``
- ``jsx``
- ``kotlin``
- ``objc``
- ``php``
- ``python``
- ``ruby``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ let query = TreeSitterModel.shared.swiftQuery
- ``javascriptQuery``
- ``jsonQuery``
- ``jsxQuery``
- ``kotlinQuery``
- ``objcQuery``
- ``phpQuery``
- ``pythonQuery``
- ``rubyQuery``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@

(new_expression
constructor: (_) @name) @reference.class

(export_statement value: (assignment_expression left: (identifier) @name right: ([
(number)
(string)
(identifier)
(undefined)
(null)
(new_expression)
(binary_expression)
(call_expression)
]))) @definition.constant
Loading