Skip to content

Commit

Permalink
added support for Kotlin language
Browse files Browse the repository at this point in the history
  • Loading branch information
sonique6784 committed Nov 18, 2023
1 parent ce338c7 commit d46ee56
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/tabby-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ reqwest = { workspace = true, features = [ "json" ] }
uuid = { version = "1.4.1", features = ["v4"] }
tantivy.workspace = true
anyhow.workspace = true
tree-sitter-kotlin = "0.3.1"

[features]
testutils = []
24 changes: 24 additions & 0 deletions crates/tabby-common/assets/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ top_level_keywords = [
"return",
]

[[config]]
languages = ["kotlin"]
line_comment = "//"
top_level_keywords = [
"abstract",
"public",
"private",
"companion",
"class",
"data",
"const",
"actual",
"expect",
"sealed",
"suspend",
"fun",
"import",
"interface",
"package",
"var",
"val",
"enum",
]

[[config]]
languages = ["javascript", "typescript", "javascriptreact", "typescriptreact"]
line_comment = "//"
Expand Down
1 change: 1 addition & 0 deletions crates/tabby-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ serde-jsonlines = { workspace = true }
file-rotate = "0.7.5"
tree-sitter-python = "0.20.2"
tree-sitter-java = "0.20.2"
tree-sitter-kotlin = "0.3.1"
tree-sitter-rust = "0.20.3"
tree-sitter-typescript = "0.20.3"
tree-sitter-go = "0.20.0"
Expand Down
12 changes: 12 additions & 0 deletions crates/tabby-scheduler/src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ lazy_static! {
("haskell", vec!["hs"]),
("html", vec!["html"]),
("java", vec!["java"]),
("kotlin", vec!["kt", "kts"]),
("julia", vec!["jl"]),
("lua", vec!["lua"]),
("makefile", vec!["Makefile"]),
Expand Down Expand Up @@ -257,6 +258,17 @@ lazy_static! {
.unwrap(),
),
),
(
"kotlin",
TagsConfigurationSync(
TagsConfiguration::new(
tree_sitter_kotlin::language(),
tree_sitter_kotlin::TAGGING_QUERY,
"",
)
.unwrap(),
),
),
(
"javascript-typescript",
TagsConfigurationSync(
Expand Down
2 changes: 2 additions & 0 deletions website/docs/programming-languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ For an actual example of an issue or pull request adding the above support, plea
* [Golang](https://go.dev/): Since v0.4.0
* [Ruby](https://www.ruby-lang.org/): Since v0.4.0
* [Java](https://www.java.com/): Since v0.6.0
* [Kotlin](https://www.kotlinlang.org/): Since v0.6.0

## Languages Missing Certain Support

Expand All @@ -42,3 +43,4 @@ For an actual example of an issue or pull request adding the above support, plea
| PHP | 🚫 | 🚫 |
| Perl | 🚫 | 🚫 |
| Scala | 🚫 | 🚫 |
| Kotlin | 🚫 | 🚫 |

0 comments on commit d46ee56

Please sign in to comment.